From 3349930483a22448cf9a81322be91fc63dd951e2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 8 May 2015 13:26:34 -0400 Subject: [PATCH] Allow fromJSON to be called on unsaved items --- chrome/content/zotero/xpcom/data/item.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index c18257b10f..a06626e5ec 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -4011,7 +4011,9 @@ Zotero.Item.prototype.isCollection = function() { Zotero.Item.prototype.fromJSON = Zotero.Promise.coroutine(function* (json) { - yield this.loadAllData(); + if (this._identified) { + yield this.loadAllData(); + } this.setType(Zotero.ItemTypes.getID(json.itemType));