Skip to content

Commit

Permalink
Use less misleading variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed Oct 9, 2024
1 parent 60fb7fd commit a1e27c4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions chrome/content/zotero/xpcom/jurismMapExtensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,19 @@ Zotero.Jurism.MapTools = {
},

getEncodeField: function(zField, cslMap) {
for (var cField in cslMap) {
if ("string" === typeof cslMap[cField]) {
if (cslMap[cField] === zField) {
return cField;
for (var mapField in cslMap) {
if ("string" === typeof cslMap[mapField]) {
if (cslMap[mapField] === zField) {
return mapField;
}
} else {
if (cField === "shortTitle") {
if (mapField === "shortTitle") {
continue;
}
for (var i=0,ilen=cslMap[cField].length; i<ilen; i++) {
var val = cslMap[cField][i];
for (var i=0,ilen=cslMap[mapField].length; i<ilen; i++) {
var val = cslMap[mapField][i];
if (val === zField) {
return cField;
return mapField;
}
}
}
Expand Down

0 comments on commit a1e27c4

Please sign in to comment.