fix issue in search
This commit is contained in:
parent
5587f8b8cd
commit
e4bb4f4c2a
1 changed files with 1 additions and 1 deletions
|
@ -151,6 +151,7 @@ function initSearch() {
|
||||||
}
|
}
|
||||||
$searchResults.style.display = term === "" ? "none" : "block";
|
$searchResults.style.display = term === "" ? "none" : "block";
|
||||||
$searchResultsItems.innerHTML = "";
|
$searchResultsItems.innerHTML = "";
|
||||||
|
currentTerm = term;
|
||||||
if (term === "") {
|
if (term === "") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -161,7 +162,6 @@ function initSearch() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
currentTerm = term;
|
|
||||||
for (var i = 0; i < Math.min(results.length, MAX_ITEMS); i++) {
|
for (var i = 0; i < Math.min(results.length, MAX_ITEMS); i++) {
|
||||||
var item = document.createElement("li");
|
var item = document.createElement("li");
|
||||||
item.innerHTML = formatSearchResultItem(results[i], term.split(" "));
|
item.innerHTML = formatSearchResultItem(results[i], term.split(" "));
|
||||||
|
|
Loading…
Reference in a new issue