Fix regression in 84730e610c

Only switch item types in fromJSON() if one was actually parsed out of
Extra
This commit is contained in:
Dan Stillman 2020-11-27 18:04:03 -05:00
parent a249cd1608
commit 01646f1f8f

View file

@ -4247,7 +4247,8 @@ Zotero.Item.prototype.fromJSON = function (json, options = {}) {
// TEMP until we move creator lines to real creators
.concat('creators')
);
if (json.itemType != itemType) {
// If a different item type was parsed out of Extra, use that instead
if (itemType && json.itemType != itemType) {
itemTypeID = Zotero.ItemTypes.getID(itemType);
this.setType(itemTypeID);
}