From bef751a5917f8c91b9059fc4926470509afce3b9 Mon Sep 17 00:00:00 2001 From: Rizumu Ayaka Date: Fri, 23 Jan 2026 20:26:38 +0800 Subject: [PATCH] fix: delayed recursion --- src/lib/litegraph/src/LGraphGroup.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/litegraph/src/LGraphGroup.ts b/src/lib/litegraph/src/LGraphGroup.ts index 42b8528b7..f4a50c996 100644 --- a/src/lib/litegraph/src/LGraphGroup.ts +++ b/src/lib/litegraph/src/LGraphGroup.ts @@ -269,12 +269,15 @@ export class LGraphGroup implements Positionable, IPinnable, IColorable { } // Move groups we wholly contain and recursively compute their children + const containedGroups: LGraphGroup[] = [] for (const group of groups) { if (group !== this && containsRect(this._bounding, group._bounding)) { children.add(group) - group.recomputeInsideNodes(maxDepth - 1) + containedGroups.push(group) } } + for (const group of containedGroups) + group.recomputeInsideNodes(maxDepth - 1) groups.sort((a, b) => { if (a === this) {