fix(M02): 도면 양식 저장이 빈 {} 로 덮이던 흠 — getDoc 을 await · 서버는 뼈대 없는 문서를 400 으로 거절
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0148XFUpPfpiuTjxF1EK9c95
This commit is contained in:
@@ -23,7 +23,7 @@ export interface Selection {
|
||||
}
|
||||
|
||||
interface EditorHandle {
|
||||
getDoc: () => unknown;
|
||||
getDoc: () => unknown | Promise<unknown>;
|
||||
destroy: () => void;
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ export function createMain(isAdmin: boolean): MainHandle {
|
||||
if (!sel) return;
|
||||
const at = sel;
|
||||
try {
|
||||
const doc = editor ? editor.getDoc() : loaded;
|
||||
const doc = editor ? await editor.getDoc() : loaded;
|
||||
const info = await saveTemplate(at.layer, at.kind, at.name, at.projectId, version, doc);
|
||||
version = info.판;
|
||||
loaded = doc;
|
||||
|
||||
Reference in New Issue
Block a user