www

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

commit 818ef28f88f014c1d040a6d39574ee2febfca4cb
parent 1d3113971b89281b44c8e64db0d20c04204706ae
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri,  8 Jan 2016 03:43:10 -0500

Fixes #876, Uncaught error in getTypesForItemType with valid input

Diffstat:
Mchrome/content/zotero/xpcom/connector/cachedTypes.js | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/connector/cachedTypes.js b/chrome/content/zotero/xpcom/connector/cachedTypes.js @@ -100,9 +100,14 @@ Zotero.Connector_Types = new function() { var itemType = itemTypes[idOrName]; if(!itemType) return false; - var itemCreatorTypes = itemType[3]/* creatorTypes */, - n = itemCreatorTypes.length, - outputTypes = new Array(n); + var itemCreatorTypes = itemType[3]; // creatorTypes + if (!itemCreatorTypes + // TEMP: 'note' and 'attachment' have an array containing false + || (itemCreatorTypes.length == 1 && !itemCreatorTypes[0])) { + return []; + } + var n = itemCreatorTypes.length; + var outputTypes = new Array(n); for(var i=0; i<n; i++) { var creatorType = creatorTypes[itemCreatorTypes[i]];