好多大米 преди 4 години
родител
ревизия
4d7d24b200
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      packages/tree/src/model/node.js

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

@@ -220,7 +220,7 @@ export default class Node {
 
     if (!(child instanceof Node)) {
       if (!batch) {
-        const children = this.getChildren(true);
+        const children = this.getChildren(true) || [];
         if (children.indexOf(child.data) === -1) {
           if (typeof index === 'undefined' || index < 0) {
             children.push(child.data);