From 4a37c5647a40ca44be47a7518d84829478165d15 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 12 Aug 2008 07:45:04 +0000 Subject: [PATCH] Fix error with Create New Item from Current Page (after r3178) --- chrome/content/zotero/xpcom/data/item.js | 4 ++++ 1 file changed, 4 insertions(+) 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) {