Fixes #876, Uncaught error in getTypesForItemType with valid input
This commit is contained in:
parent
1d3113971b
commit
818ef28f88
|
@ -100,9 +100,14 @@ Zotero.Connector_Types = new function() {
|
||||||
var itemType = itemTypes[idOrName];
|
var itemType = itemTypes[idOrName];
|
||||||
if(!itemType) return false;
|
if(!itemType) return false;
|
||||||
|
|
||||||
var itemCreatorTypes = itemType[3]/* creatorTypes */,
|
var itemCreatorTypes = itemType[3]; // creatorTypes
|
||||||
n = itemCreatorTypes.length,
|
if (!itemCreatorTypes
|
||||||
outputTypes = new Array(n);
|
// 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++) {
|
for(var i=0; i<n; i++) {
|
||||||
var creatorType = creatorTypes[itemCreatorTypes[i]];
|
var creatorType = creatorTypes[itemCreatorTypes[i]];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user