commit 73e1fd07b0b4a1735a22d52073cff1148562d025 parent 99cd11e7937c24bba3adef01e08f9e00ab2ea78a Author: Dan Stillman <dstillman@zotero.org> Date: Tue, 6 Dec 2016 08:17:45 -0500 Fix error exporting standalone notes Diffstat:
| M | chrome/content/zotero/xpcom/translation/translate_item.js | | | 16 | +++++++++------- |
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -874,13 +874,15 @@ Zotero.Translate.ItemGetter.prototype = { // get attachments, although only urls will be passed if exportFileData is off returnItemArray.attachments = []; - var attachments = returnItem.getAttachments(); - for (let attachmentID of attachments) { - var attachment = Zotero.Items.get(attachmentID); - var attachmentInfo = this._attachmentToArray(attachment); - - if(attachmentInfo) { - returnItemArray.attachments.push(attachmentInfo); + if (returnItem.isRegularItem()) { + var attachments = returnItem.getAttachments(); + for (let attachmentID of attachments) { + var attachment = Zotero.Items.get(attachmentID); + var attachmentInfo = this._attachmentToArray(attachment); + + if(attachmentInfo) { + returnItemArray.attachments.push(attachmentInfo); + } } }