Prevent error when creating a note from annotations that have ink

(cherry picked from commit 4fdf43ed92)
This commit is contained in:
Martynas Bagdonas 2022-09-30 09:44:27 +03:00
parent 764d1b006e
commit d484d16128
2 changed files with 4 additions and 3 deletions

View file

@ -1394,7 +1394,8 @@ class EditorInstanceUtilities {
if (!annotation.text
&& !annotation.comment
&& !annotation.imageAttachmentKey) {
&& !annotation.imageAttachmentKey
|| annotation.type === 'ink') {
continue;
}

View file

@ -5038,7 +5038,7 @@ var ZoteroPane = new function()
catch (e) {
Zotero.logError(e);
}
annotations.push(...attachment.getAnnotations());
annotations.push(...attachment.getAnnotations().filter(x => x.annotationType != 'ink'));
}
var note = await Zotero.EditorInstance.createNoteFromAnnotations(
annotations,
@ -5134,7 +5134,7 @@ var ZoteroPane = new function()
catch (e) {
Zotero.logError(e);
}
annotations.push(...attachment.getAnnotations());
annotations.push(...attachment.getAnnotations().filter(x => x.annotationType != 'ink'));
}
}