Tree: fix markNodeData error when data is falsy (#11376)

This commit is contained in:
杨奕
2018-05-28 16:57:00 +08:00
committed by GitHub
parent c9ea4161f1
commit f9dffdd12c

View File

@@ -1,7 +1,7 @@
export const NODE_KEY = '$treeNodeId';
export const markNodeData = function(node, data) {
if (data[NODE_KEY]) return;
if (!data || data[NODE_KEY]) return;
Object.defineProperty(data, NODE_KEY, {
value: node.id,
enumerable: false,