change behavior of trie-suggest
This commit is contained in:
parent
1fa47d4abd
commit
a166ebb0d7
1 changed files with 1 additions and 1 deletions
|
|
@ -153,7 +153,7 @@ const __suggest = (trie, path, remaining, maxSuggestions) => {
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
const [pos, prefix] = binarySearch(trie.children, remaining);
|
const [pos, prefix] = binarySearch(trie.children, remaining);
|
||||||
if (prefix.length === 0) {
|
if (prefix.length !== remaining.length) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const [haveKey, haveChildNode] = trie.children[pos];
|
const [haveKey, haveChildNode] = trie.children[pos];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue