From 76b96a8b070c592232986925ac7313e13e7296de Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 28 Nov 2017 23:22:11 -0500 Subject: [PATCH] Fix error selecting item with item type without creator types https://forums.zotero.org/discussion/69118/ --- 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 index 53f6f3b947..8a72d10253 100644 --- 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]; }