Fix error with Create New Item from Current Page (after r3178)

This commit is contained in:
Dan Stillman 2008-08-12 07:45:04 +00:00
parent 2d5c89cb9d
commit 4a37c5647a

View file

@ -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) {