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

Tree: fix updateKeyChildren

parent 03ccdb4f
......@@ -198,10 +198,9 @@ export default class TreeStore {
const node = this.nodesMap[key];
if (!node) return;
const childNodes = node.childNodes;
for (let i = 0, j = childNodes.length; i < j; i++) {
const child = childNodes[i];
childNodes.forEach(child => {
this.remove(child.data);
}
});
for (let i = 0, j = data.length; i < j; i++) {
const child = data[i];
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