fix(edit-docs): preserve attachment IDs

This commit is contained in:
Elian Doran 2025-03-10 20:50:57 +02:00
parent b412f06b79
commit d134ee0552
No known key found for this signature in database

View File

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