Avoid error interrupting annotation extraction from multiple items
This commit is contained in:
parent
111a254696
commit
3fd0abf6b0
3 changed files with 14 additions and 8 deletions
|
@ -440,9 +440,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();
|
||||
|
||||
|
|
|
@ -4835,9 +4835,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);
|
||||
}
|
||||
|
@ -4875,7 +4877,9 @@ var ZoteroPane = new function()
|
|||
attachment,
|
||||
{ skipSelect: true }
|
||||
);
|
||||
itemIDsToSelect.push(note.id);
|
||||
if (note) {
|
||||
itemIDsToSelect.push(note.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
await this.selectItems(itemIDsToSelect);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 1a3fa7b30df0a1530d49042a308e0840ac907f1a
|
||||
Subproject commit fb3daf6c7e1d7a91992deeea52889cb9c95972f7
|
Loading…
Add table
Add a link
Reference in a new issue