@tmagic/editor 1.3.0-alpha.15 → 1.3.0-alpha.16
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.
|
@@ -7794,12 +7794,14 @@
|
|
|
7794
7794
|
* @param nodes 需要清除依赖的节点
|
|
7795
7795
|
*/
|
|
7796
7796
|
clear(nodes) {
|
|
7797
|
+
const clearedItemsNodeIds = [];
|
|
7797
7798
|
Object.values(this.targets).forEach((targets) => {
|
|
7798
7799
|
Object.values(targets).forEach((target) => {
|
|
7799
7800
|
if (nodes) {
|
|
7800
7801
|
nodes.forEach((node) => {
|
|
7801
7802
|
target.removeDep(node);
|
|
7802
|
-
if (Array.isArray(node.items)) {
|
|
7803
|
+
if (Array.isArray(node.items) && node.items.length && !clearedItemsNodeIds.includes(node.id)) {
|
|
7804
|
+
clearedItemsNodeIds.push(node.id);
|
|
7803
7805
|
this.clear(node.items);
|
|
7804
7806
|
}
|
|
7805
7807
|
});
|