diff --git a/chrome/content/zotero/xpcom/editorInstance.js b/chrome/content/zotero/xpcom/editorInstance.js index a8b8fde9bd..dd90e0e9ca 100644 --- a/chrome/content/zotero/xpcom/editorInstance.js +++ b/chrome/content/zotero/xpcom/editorInstance.js @@ -181,6 +181,12 @@ class EditorInstance { if (!attachmentItem) { continue; } + + if (!annotation.text + && !annotation.comment + && !annotation.image) { + continue; + } let citationHTML = ''; let imageHTML = ''; @@ -942,7 +948,7 @@ class EditorInstance { let jsonAnnotations = []; for (let annotation of annotations) { let jsonAnnotation = await Zotero.Annotations.toJSON(annotation); - jsonAnnotation.itemID = attachmentItem.id; + jsonAnnotation.attachmentItemID = attachmentItem.id; jsonAnnotations.push(jsonAnnotation); } let html = `
(${(new Date()).toLocaleString()})
\n`;