Avoid console error

This commit is contained in:
Mouse Reeve 2022-01-12 17:08:10 -08:00
parent 80efd58881
commit fc06f0cdd1
1 changed files with 2 additions and 2 deletions

View File

@ -43,11 +43,11 @@
function getSuggestions(input, trie) { function getSuggestions(input, trie) {
// Follow the trie through the provided input // Follow the trie through the provided input
input.split("").forEach((letter) => { input.split("").forEach((letter) => {
trie = trie[letter];
if (!trie) { if (!trie) {
return; return;
} }
trie = trie[letter];
}); });
if (!trie) { if (!trie) {