diff --git a/src/system/searchTree.ts b/src/system/searchTree.ts index cd5a042..3cf34a3 100644 --- a/src/system/searchTree.ts +++ b/src/system/searchTree.ts @@ -200,7 +200,8 @@ export class TernarySearchTree { } has(key: K): boolean { - return Boolean(this._getNode(key)); + const node = this._getNode(key); + return !(node?.value === undefined && node?.mid === undefined); } delete(key: K): void {