Fixes #876, Uncaught error in getTypesForItemType with valid input

This commit is contained in:
Dan Stillman 2016-01-08 03:43:10 -05:00
parent 1d3113971b
commit 818ef28f88

View File

@ -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]];