mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 18:39:22 +08:00
fix(edit-docs): preserve attachment IDs
This commit is contained in:
parent
b412f06b79
commit
d134ee0552
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user