Handle empty search in fuzzyQuery function

Add check for empty search string in fuzzyQuery function.
This commit is contained in:
ew
2025-10-13 22:33:08 +08:00
committed by GitHub
parent 971aaf3b98
commit 769ad73737
@@ -21,6 +21,9 @@ Singleton {
entry: a
}))
function fuzzyQuery(search: string): var {
if (search.trim() === "") {
return entries;
}
if (root.sloppySearch) {
const results = entries.slice(0, 100).map(str => ({
entry: str,