fix(edit-docs): preserve attachment IDs

pull/1389/head
Elian Doran 2025-03-10 20:50:57 +07:00
parent b412f06b79
commit d134ee0552
No known key found for this signature in database
1 changed files with 4 additions and 0 deletions

@ -62,6 +62,10 @@ async function importZip(taskContext: TaskContext, fileBuffer: Buffer, importRoo
}
function getNewAttachmentId(origAttachmentId: string) {
if (opts?.preserveIds) {
return origAttachmentId;
}
if (!origAttachmentId.trim()) {
// this probably shouldn't happen, but still good to have this precaution
return "empty_attachment_id";