Explorar el Código

Update node.js

this.data可能为undefined,需要判断一下
wangjingf hace 7 años
padre
commit
eaba784667
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/tree/src/model/node.js

+ 1 - 1
packages/tree/src/model/node.js

@@ -111,7 +111,7 @@ export default class Node {
     } else if (this.level > 0 && store.lazy && store.defaultExpandAll) {
       this.expand();
     }
-    if (!Array.isArray(this.data)) {
+    if (this.data && !Array.isArray(this.data)) {
       markNodeData(this, this.data);
     }
     if (!this.data) return;