Commit fa522dd2 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

Tree: fix updateKeyChildren

parent 03ccdb4f
...@@ -198,10 +198,9 @@ export default class TreeStore { ...@@ -198,10 +198,9 @@ export default class TreeStore {
const node = this.nodesMap[key]; const node = this.nodesMap[key];
if (!node) return; if (!node) return;
const childNodes = node.childNodes; const childNodes = node.childNodes;
for (let i = 0, j = childNodes.length; i < j; i++) { childNodes.forEach(child => {
const child = childNodes[i];
this.remove(child.data); this.remove(child.data);
} });
for (let i = 0, j = data.length; i < j; i++) { for (let i = 0, j = data.length; i < j; i++) {
const child = data[i]; const child = data[i];
this.append(child, node.data); this.append(child, node.data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment