Fixed issues marked by linter

This commit is contained in:
KoloMl 2024-05-30 21:55:41 +04:00
parent f1aec2fd58
commit 3f2e887aec

View file

@ -4,7 +4,7 @@
import { LocalAutocompleter } from './utils/local-autocompleter';
import { handleError } from './utils/requests';
import { getTermContexts } from "./match_query";
import { getTermContexts } from './match_query';
const cache = {};
/** @type {HTMLInputElement} */
@ -13,8 +13,6 @@ let inputField,
originalTerm,
/** @type {string} */
originalQuery,
/** @type {TermContext[]} */
searchTokens,
/** @type {TermContext} */
selectedTerm;
@ -86,7 +84,7 @@ function keydownHandler(event) {
if (selectedTerm && firstItem && (event.keyCode === 37 || event.keyCode === 39)) { // ArrowLeft || ArrowRight
requestAnimationFrame(() => {
if (isSelectionOutsideCurrentTerm()) removeParent();
})
});
}
}
@ -213,7 +211,8 @@ function listenAutocomplete() {
}
originalTerm = selectedTerm[1];
} else {
}
else {
originalTerm = `${inputField.value}`.toLowerCase();
}