www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 9f8510c821cf7240efcb538883b7db683c0e7e2a
parent 3214e37d92787c1a6e19216faf037e7a4a99a4e6
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri,  8 May 2015 02:43:09 -0400

Throw ZoteroUnknownTypeError on unknown item type in getItemTypeFields

This needs to be done in additional places as well.

Diffstat:
Mchrome/content/zotero/xpcom/data/itemFields.js | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/data/itemFields.js b/chrome/content/zotero/xpcom/data/itemFields.js @@ -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) {