diff --git a/src/e3/collection/trie.py b/src/e3/collection/trie.py index a8690eeb..e469bf29 100644 --- a/src/e3/collection/trie.py +++ b/src/e3/collection/trie.py @@ -100,8 +100,10 @@ def match(self, word: str, delimiter: str | None = None) -> bool: if self.END_MARKER in cursor and (not delimiter or letter in delimiter): return True else: - cursor = cursor.get(letter, None) - if cursor is None: + new_cursor = cursor.get(letter, None) + if new_cursor is None: return False + else: + cursor = new_cursor return self.END_MARKER in cursor