Declare `word` outside the loop, as recommended by eslint
This commit is contained in:
parent
8eba927a3e
commit
dcba95f43e
|
@ -1836,7 +1836,7 @@ function defocusSearchBar() {
|
||||||
function buildIndex(rawSearchIndex) {
|
function buildIndex(rawSearchIndex) {
|
||||||
searchIndex = [];
|
searchIndex = [];
|
||||||
var searchWords = [];
|
var searchWords = [];
|
||||||
var i;
|
var i, word;
|
||||||
var currentIndex = 0;
|
var currentIndex = 0;
|
||||||
var id = 0;
|
var id = 0;
|
||||||
|
|
||||||
|
@ -1905,10 +1905,10 @@ function defocusSearchBar() {
|
||||||
// This object should have exactly the same set of fields as the "crateRow"
|
// This object should have exactly the same set of fields as the "crateRow"
|
||||||
// object defined above.
|
// object defined above.
|
||||||
if (typeof itemNames[i] === "string") {
|
if (typeof itemNames[i] === "string") {
|
||||||
var word = itemNames[i].toLowerCase();
|
word = itemNames[i].toLowerCase();
|
||||||
searchWords.push(word);
|
searchWords.push(word);
|
||||||
} else {
|
} else {
|
||||||
var word = "";
|
word = "";
|
||||||
searchWords.push("");
|
searchWords.push("");
|
||||||
}
|
}
|
||||||
var normalizedName = word.indexOf("_") === -1
|
var normalizedName = word.indexOf("_") === -1
|
||||||
|
|
Loading…
Reference in New Issue