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
|
@ -198,7 +198,9 @@ Zotero.ItemFields = new function() {
|
||||||
*/
|
*/
|
||||||
function getItemTypeFields(itemTypeID) {
|
function getItemTypeFields(itemTypeID) {
|
||||||
if (!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) {
|
if (!_itemTypeFieldsLoaded) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user