diff --git a/frontend/book-editor.html b/frontend/book-editor.html index a065216..6a86ed6 100644 --- a/frontend/book-editor.html +++ b/frontend/book-editor.html @@ -150,7 +150,7 @@ - PDF 매칭 없음 + PDF 매칭 없음 diff --git a/frontend/static/js/book-editor.js b/frontend/static/js/book-editor.js index 8aa18d1..fd3b423 100644 --- a/frontend/static/js/book-editor.js +++ b/frontend/static/js/book-editor.js @@ -95,6 +95,11 @@ window.bookEditorApp = () => ({ console.log(`📄 문서 ${index + 1}: ${doc.title}`); console.log(` - matched_pdf_id: ${doc.matched_pdf_id || 'null'}`); console.log(` - sort_order: ${doc.sort_order || 'null'}`); + + // null 값을 빈 문자열로 변환 (UI 바인딩을 위해) + if (doc.matched_pdf_id === null) { + doc.matched_pdf_id = ""; + } }); // 사용 가능한 PDF 문서들 로드 (현재 서적의 PDF만) @@ -237,7 +242,7 @@ window.bookEditorApp = () => ({ return window.api.updateDocument(doc.id, { sort_order: doc.sort_order, - matched_pdf_id: doc.matched_pdf_id === "" ? null : doc.matched_pdf_id + matched_pdf_id: doc.matched_pdf_id === "" || doc.matched_pdf_id === null ? null : doc.matched_pdf_id }); });