Avoid console error
This commit is contained in:
parent
80efd58881
commit
fc06f0cdd1
@ -43,11 +43,11 @@
|
||||
function getSuggestions(input, trie) {
|
||||
// Follow the trie through the provided input
|
||||
input.split("").forEach((letter) => {
|
||||
trie = trie[letter];
|
||||
|
||||
if (!trie) {
|
||||
return;
|
||||
}
|
||||
|
||||
trie = trie[letter];
|
||||
});
|
||||
|
||||
if (!trie) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user