Prevent error when creating a note from annotations that have ink

This commit is contained in:
Martynas Bagdonas 2022-09-30 09:44:27 +03:00
parent 9691fcafc2
commit 4fdf43ed92
2 changed files with 4 additions and 3 deletions

View file

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

View file

@ -5049,7 +5049,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,
@ -5145,7 +5145,7 @@ var ZoteroPane = new function()
catch (e) {
Zotero.logError(e);
}
annotations.push(...attachment.getAnnotations());
annotations.push(...attachment.getAnnotations().filter(x => x.annotationType != 'ink'));
}
}