diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 28b5b5a65..1946af5db 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -2436,6 +2436,10 @@ Zotero.Item.prototype.__defineGetter__('attachmentPath', function () { return this._attachmentPath; } + if (!this.id) { + return undefined; + } + var sql = "SELECT path FROM itemAttachments WHERE itemID=?"; var path = Zotero.DB.valueQuery(sql, this.id); if (!path) {