From a166ebb0d703dc77f3939a35cf4cc186cd0cc1d8 Mon Sep 17 00:00:00 2001 From: Joeri Exelmans Date: Sat, 10 May 2025 15:49:59 +0200 Subject: [PATCH] change behavior of trie-suggest --- lib/util/trie.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/trie.js b/lib/util/trie.js index 43585ab..2bdff26 100644 --- a/lib/util/trie.js +++ b/lib/util/trie.js @@ -153,7 +153,7 @@ const __suggest = (trie, path, remaining, maxSuggestions) => { return results; } const [pos, prefix] = binarySearch(trie.children, remaining); - if (prefix.length === 0) { + if (prefix.length !== remaining.length) { return []; } const [haveKey, haveChildNode] = trie.children[pos];