@zhongguo168a/yxeditor-common 0.0.98 → 0.0.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +3 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2476,6 +2476,9 @@ class TreeRoot extends EventDispatcher {
|
|
|
2476
2476
|
node.parent = null;
|
|
2477
2477
|
}
|
|
2478
2478
|
removeChildren(node) {
|
|
2479
|
+
if (!node.children || node.children.length == 0) {
|
|
2480
|
+
return;
|
|
2481
|
+
}
|
|
2479
2482
|
let children = node.children.concat();
|
|
2480
2483
|
for (let item of children) {
|
|
2481
2484
|
this.removeNode(item);
|