fix: generateDocument 반환값 불일치 + documents undefined 방어
ipcSuccess(doc)가 MeetingDocument를 직접 반환하는데 UI에서 resp.data.document로 접근하여 undefined 크래시. resp.data로 직접 접근하도록 수정. preload 타입도 수정.
This commit is contained in:
parent
f0e221058d
commit
6dd4846de7
2 changed files with 7 additions and 6 deletions
|
|
@ -623,7 +623,7 @@ const electronAPI = {
|
|||
updateTranscript: (params: MeetingUpdateTranscriptParams) =>
|
||||
invoke<void>(IPC_CHANNELS.MEETING_MODE.UPDATE_TRANSCRIPT, params),
|
||||
generateDocument: (params: MeetingGenerateDocParams) =>
|
||||
invoke<MeetingGenerateDocResult>(IPC_CHANNELS.MEETING_MODE.GENERATE_DOCUMENT, params),
|
||||
invoke<MeetingDocument>(IPC_CHANNELS.MEETING_MODE.GENERATE_DOCUMENT, params),
|
||||
getDocuments: (params: MeetingGetDocsParams) =>
|
||||
invoke<MeetingDocument[]>(IPC_CHANNELS.MEETING_MODE.GET_DOCUMENTS, params),
|
||||
updateDocument: (params: MeetingUpdateDocParams) =>
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ export function MeetingDetailTabs({
|
|||
})
|
||||
setGenerating(false)
|
||||
if (resp.success) {
|
||||
const newDoc = resp.data.document
|
||||
const newDoc = resp.data
|
||||
setDocuments((prev) => {
|
||||
// 새 문서 탭으로 이동: 전사(0) + 기존문서수 + 1
|
||||
setTabIndex(prev.length + 1)
|
||||
|
|
@ -308,8 +308,9 @@ export function MeetingDetailTabs({
|
|||
onSaveTranscript={handleSaveTranscript}
|
||||
/>
|
||||
)}
|
||||
{documents.map((doc, idx) =>
|
||||
tabIndex === idx + 1 ? (
|
||||
{documents.filter(Boolean).map((doc, idx) => {
|
||||
if (!doc || tabIndex !== idx + 1) return null
|
||||
return (
|
||||
<DocumentTab
|
||||
key={doc.id}
|
||||
document={doc}
|
||||
|
|
@ -317,8 +318,8 @@ export function MeetingDetailTabs({
|
|||
onExport={(format) => handleExportDocument(doc.id, format)}
|
||||
onDelete={() => handleDeleteDocument(doc.id)}
|
||||
/>
|
||||
) : null,
|
||||
)}
|
||||
)
|
||||
})}
|
||||
</Box>
|
||||
|
||||
{/* AI 채팅 패널 */}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue