mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 05:57:03 +03:00
Declare word outside the loop, as recommended by eslint
This commit is contained in:
@@ -1836,7 +1836,7 @@ function defocusSearchBar() {
|
||||
function buildIndex(rawSearchIndex) {
|
||||
searchIndex = [];
|
||||
var searchWords = [];
|
||||
var i;
|
||||
var i, word;
|
||||
var currentIndex = 0;
|
||||
var id = 0;
|
||||
|
||||
@@ -1905,10 +1905,10 @@ function defocusSearchBar() {
|
||||
// This object should have exactly the same set of fields as the "crateRow"
|
||||
// object defined above.
|
||||
if (typeof itemNames[i] === "string") {
|
||||
var word = itemNames[i].toLowerCase();
|
||||
word = itemNames[i].toLowerCase();
|
||||
searchWords.push(word);
|
||||
} else {
|
||||
var word = "";
|
||||
word = "";
|
||||
searchWords.push("");
|
||||
}
|
||||
var normalizedName = word.indexOf("_") === -1
|
||||
|
||||
Reference in New Issue
Block a user