Преглед изворни кода

Tree: fix tree node not deleted (#12684)

hetech пре 7 година
родитељ
комит
3cf277c616
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      packages/tree/src/model/node.js

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

@@ -287,7 +287,7 @@ export default class Node {
     let targetNode = null;
 
     for (let i = 0; i < this.childNodes.length; i++) {
-      if (this.childNodes[i] === data) {
+      if (this.childNodes[i].data === data) {
         targetNode = this.childNodes[i];
         break;
       }