commit 76b96a8b070c592232986925ac7313e13e7296de parent d5dd5c5100a0656eba217033cf3f294c9aed01f2 Author: Dan Stillman <dstillman@zotero.org> Date: Tue, 28 Nov 2017 23:22:11 -0500 Fix error selecting item with item type without creator types https://forums.zotero.org/discussion/69118/ Diffstat:
| M | chrome/content/zotero/xpcom/data/cachedTypes.js | | | 6 | ++---- |
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/cachedTypes.js b/chrome/content/zotero/xpcom/data/cachedTypes.js @@ -219,7 +219,6 @@ Zotero.CreatorTypes = new function() { Zotero.CachedTypes.apply(this, arguments); this.constructor.prototype = new Zotero.CachedTypes(); - this.getTypesForItemType = getTypesForItemType; this.isValidForItemType = isValidForItemType; this._typeDesc = 'creator type'; @@ -267,11 +266,10 @@ Zotero.CreatorTypes = new function() { }); - function getTypesForItemType(itemTypeID) { + this.getTypesForItemType = function (itemTypeID) { if (!_creatorTypesByItemType[itemTypeID]) { - throw new Error("Creator types not loaded for itemTypeID " + itemTypeID); + return []; } - return _creatorTypesByItemType[itemTypeID]; }