diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 485c4c4fc3..bb42eb72e5 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -3802,6 +3802,10 @@ Zotero.Item.prototype.fromJSON = Zotero.Promise.coroutine(function* (json) { yield this.loadAllData(); } + if (!json.itemType && !this._itemTypeID) { + throw new Error("itemType property not provided"); + } + let itemTypeID = Zotero.ItemTypes.getID(json.itemType); this.setType(itemTypeID);