commit 4a37c5647a40ca44be47a7518d84829478165d15
parent 2d5c89cb9d33e5501d65f6b1da558c24874ccf46
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 12 Aug 2008 07:45:04 +0000
Fix error with Create New Item from Current Page (after r3178)
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git 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) {