Allow fromJSON to be called on unsaved items

This commit is contained in:
Dan Stillman 2015-05-08 13:26:34 -04:00
parent 5635fec4e3
commit 3349930483

View file

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