Import external annotations before trying to add a note from annotations

This commit is contained in:
Martynas Bagdonas 2022-09-30 09:40:35 +03:00
parent 6aad0cbb9c
commit 9691fcafc2

View file

@ -5043,6 +5043,12 @@ var ZoteroPane = new function()
var annotations = [];
for (let attachment of attachments) {
try {
await Zotero.PDFWorker.import(attachment.id, true);
}
catch (e) {
Zotero.logError(e);
}
annotations.push(...attachment.getAnnotations());
}
var note = await Zotero.EditorInstance.createNoteFromAnnotations(
@ -5133,6 +5139,12 @@ var ZoteroPane = new function()
continue;
}
for (let attachment of attachments) {
try {
await Zotero.PDFWorker.import(attachment.id, true);
}
catch (e) {
Zotero.logError(e);
}
annotations.push(...attachment.getAnnotations());
}
}