Throw ZoteroUnknownTypeError on unknown item type in getItemTypeFields

This needs to be done in additional places as well.
This commit is contained in:
Dan Stillman 2015-05-08 02:43:09 -04:00
parent 3214e37d92
commit 9f8510c821

View file

@ -198,7 +198,9 @@ Zotero.ItemFields = new function() {
*/
function getItemTypeFields(itemTypeID) {
if (!itemTypeID) {
throw new Error("Invalid item type id '" + itemTypeID + "'");
let e = new Error("Invalid item type id '" + itemTypeID + "'");
e.name = "ZoteroUnknownTypeError";
throw e;
}
if (!_itemTypeFieldsLoaded) {