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 if (!annotation.text
&& !annotation.comment && !annotation.comment
&& !annotation.imageAttachmentKey) { && !annotation.imageAttachmentKey
|| annotation.type === 'ink') {
continue; continue;
} }

View file

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