commit 3349930483a22448cf9a81322be91fc63dd951e2 parent 5635fec4e3ccf9c84556216518d44031cd525767 Author: Dan Stillman <dstillman@zotero.org> Date: Fri, 8 May 2015 13:26:34 -0400 Allow fromJSON to be called on unsaved items Diffstat:
| M | 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 @@ -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));