Avoid error interrupting annotation extraction from multiple items
This commit is contained in:
parent
477dd69d54
commit
b98a5e0545
3 changed files with 14 additions and 8 deletions
|
@ -437,9 +437,11 @@ var ZoteroContextPane = new function () {
|
|||
if (!attachment) {
|
||||
return;
|
||||
}
|
||||
var note = await Zotero.EditorInstance.createNoteFromAnnotations(
|
||||
attachment.getAnnotations().filter(x => x.annotationType != 'ink'), child && attachment.parentID
|
||||
);
|
||||
var annotations = attachment.getAnnotations().filter(x => x.annotationType != 'ink');
|
||||
if (!annotations.length) {
|
||||
return;
|
||||
}
|
||||
var note = await Zotero.EditorInstance.createNoteFromAnnotations(annotations, child && attachment.parentID);
|
||||
|
||||
_updateAddToNote();
|
||||
|
||||
|
|
|
@ -4824,9 +4824,11 @@ var ZoteroPane = new function()
|
|||
return;
|
||||
}
|
||||
await Zotero.PDFWorker.import(attachment.id, true);
|
||||
var note = await Zotero.EditorInstance.createNoteFromAnnotations(
|
||||
attachment.getAnnotations().filter(x => x.annotationType != 'ink'), attachment.parentID
|
||||
);
|
||||
var annotations = attachment.getAnnotations().filter(x => x.annotationType != 'ink');
|
||||
if (!annotations.length) {
|
||||
return;
|
||||
}
|
||||
var note = await Zotero.EditorInstance.createNoteFromAnnotations(annotations, attachment.parentID);
|
||||
if (!skipSelect) {
|
||||
await this.selectItem(note.id);
|
||||
}
|
||||
|
@ -4864,9 +4866,11 @@ var ZoteroPane = new function()
|
|||
attachment,
|
||||
{ skipSelect: true }
|
||||
);
|
||||
if (note) {
|
||||
itemIDsToSelect.push(note.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
await this.selectItems(itemIDsToSelect);
|
||||
};
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 1a3fa7b30df0a1530d49042a308e0840ac907f1a
|
||||
Subproject commit fb3daf6c7e1d7a91992deeea52889cb9c95972f7
|
Loading…
Reference in a new issue