Don't use for-in to iterate over arrays in itemFromCSLJSON

This commit is contained in:
Aurimas Vinckevicius 2015-08-03 16:15:24 -05:00
parent dce9ff304f
commit 0fbae77456

View file

@ -1667,7 +1667,7 @@ Zotero.Utilities = {
for(var variable in CSL_TEXT_MAPPINGS) { for(var variable in CSL_TEXT_MAPPINGS) {
if(variable in cslItem) { if(variable in cslItem) {
var textMappings = CSL_TEXT_MAPPINGS[variable]; var textMappings = CSL_TEXT_MAPPINGS[variable];
for(var i in textMappings) { for(var i=0; i<textMappings.length; i++) {
var field = textMappings[i], var field = textMappings[i],
fieldID = Zotero.ItemFields.getID(field); fieldID = Zotero.ItemFields.getID(field);
if(Zotero.ItemFields.isBaseField(fieldID)) { if(Zotero.ItemFields.isBaseField(fieldID)) {