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

pull/11378/head
杨奕 2018-05-28 16:57:00 +08:00 committed by GitHub
parent c9ea4161f1
commit f9dffdd12c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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,