Skip to content

Commit

Permalink
sonarcloud: Unexpected var, use let or const instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Erwin Dondorp committed Apr 1, 2024
1 parent 8e826fc commit c7bb977
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion saltgui/static/hilitor/hilitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function Hilitor(start, id, tag)
// and performance drops with it. and it is still a good first indication.
let nv, regs;
if(this.nrHilites <= 25 && (nv = node.nodeValue) && (regs = matchRegExp.exec(nv)) && regs[0].length > 0) {
var found = isCaseSensitive ? regs[0] : regs[0].toLowerCase();
const found = isCaseSensitive ? regs[0] : regs[0].toLowerCase();
if(!wordColor[found]) {
wordColor[found] = colors[colorIdx++ % colors.length];
}
Expand Down

0 comments on commit c7bb977

Please sign in to comment.