Tree: fix registerNode error when nodeKey is 0

This commit is contained in:
Leopoldthecoder
2017-04-24 13:44:27 +08:00
parent 7036276b8a
commit 1c4ff99508
4 changed files with 4 additions and 3 deletions

View File

@@ -132,7 +132,7 @@ export default class TreeStore {
if (!key || !node || !node.data) return;
const nodeKey = node.key;
if (nodeKey) this.nodesMap[node.key] = node;
if (nodeKey !== undefined) this.nodesMap[node.key] = node;
}
deregisterNode(node) {