We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9dd5e4a commit 160a798Copy full SHA for 160a798
src/services/helper.ts
@@ -127,7 +127,7 @@ export class TreeViewUtil<T extends BaseProps> implements ITreeInterface<T> {
127
const parentIndex = this.getIndex(index.parent!);
128
const parentNode = this.get(index.parent!);
129
130
- if (parentNode && parentIndex) {
+ if (parentNode && parentIndex && parentIndex[this.childNodeName]) {
131
parentNode[this.childNodeName].splice(
132
parentNode[this.childNodeName].indexOf(node),
133
1
@@ -167,7 +167,7 @@ export class TreeViewUtil<T extends BaseProps> implements ITreeInterface<T> {
167
return null;
168
}
169
170
- updateChildren(children: IIndex<T>) {
+ updateChildren(children: IIndex<T> = []) {
171
const self = this;
172
children.forEach(function (id, i) {
173
const index = self.getIndex(id);
0 commit comments