Small JS code improvements
This commit is contained in:
parent
082e4ca497
commit
ae93e6e3b8
2 changed files with 5 additions and 6 deletions
|
@ -112,10 +112,6 @@ window.initSearch = function(rawSearchIndex) {
|
|||
* @type {Array<Row>}
|
||||
*/
|
||||
let searchIndex;
|
||||
/**
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
let searchWords = [];
|
||||
let currentResults;
|
||||
const ALIASES = {};
|
||||
const params = searchState.getQueryStringParams();
|
||||
|
@ -2118,7 +2114,10 @@ window.initSearch = function(rawSearchIndex) {
|
|||
search(undefined, true);
|
||||
}
|
||||
|
||||
searchWords = buildIndex(rawSearchIndex);
|
||||
/**
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
const searchWords = buildIndex(rawSearchIndex);
|
||||
registerSearchEvents();
|
||||
|
||||
function runSearchIfNeeded() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Local js definitions:
|
||||
/* eslint-env es6 */
|
||||
/* eslint no-var: "error" */
|
||||
/* eslint prefer-const: "error" */
|
||||
// Local js definitions:
|
||||
/* global getSettingValue, getVirtualKey, onEachLazy, updateLocalStorage, updateSystemTheme */
|
||||
/* global addClass, removeClass */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue