Browse Source

Fixes bad has implementation

main
Eric Amodio 4 years ago
parent
commit
cfca480725
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/system/searchTree.ts

+ 2
- 1
src/system/searchTree.ts View File

@ -200,7 +200,8 @@ export class TernarySearchTree {
} }
has(key: K): boolean { 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 { delete(key: K): void {

Loading…
Cancel
Save