Allow fromJSON to be called on unsaved items
This commit is contained in:
parent
5635fec4e3
commit
3349930483
1 changed files with 3 additions and 1 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in a new issue