commit 60ae71d9645112621bb4cd3e76925de86886a768 parent 56a31cbd725238dd83da52c3da38225d4516380a Author: Dan Stillman <dstillman@zotero.org> Date: Thu, 9 Sep 2010 22:01:53 +0000 Merge r6708 from branch to trunk Diffstat:
| M | chrome/content/zotero/xpcom/data/item.js | | | 15 | ++++++++++----- |
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -1216,17 +1216,22 @@ Zotero.Item.prototype.save = function() { sql = sql.substring(0, sql.length-2) + ")"; // Save basic data to items table + try { + // Needed to work around startup crash in Fx3.5 + var l = this.libraryID; + var k = this.key; + var insertID = Zotero.DB.query(sql, sqlValues); } catch (e) { - if (this.libraryID - && ((e.indexOf && e.indexOf('fki_items_libraryID_libraries_libraryID') != -1) - || (!Zotero.Libraries.exists(this.libraryID)))) { - var msg = "Library " + this.libraryID + " for item " + this.key + " not found"; + if (l && + ((e.indexOf && e.indexOf('fki_items_libraryID_libraries_libraryID') != -1) + || (!Zotero.Libraries.exists(l)))) { + var msg = "Library " + l + " for item " + k + " not found";; var e = new Zotero.Error(msg, "MISSING_OBJECT"); - throw (e); } + throw (e); } if (!itemID) { itemID = insertID;