Throw ZoteroUnknownTypeError on unknown item type in getItemTypeFields
This needs to be done in additional places as well.
This commit is contained in:
parent
3214e37d92
commit
9f8510c821
1 changed files with 3 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue