Browse Source

fix(gui-v2): init trie in AC tree

pull/2998/head
Wing-Kam Wong 2 years ago
parent
commit
59b6be25b1
  1. 2
      packages/nc-gui-v2/utils/NcAutocompleteTree.ts

2
packages/nc-gui-v2/utils/NcAutocompleteTree.ts

@ -24,7 +24,7 @@ export class NcAutocompleteTree {
}
add(word: Record<string, any>) {
if (!this.trie) {
if (Object.keys(this.trie).length === 0) {
this.trie = this.newNode()
}

Loading…
Cancel
Save