This commit is contained in:
space-nuko
2023-05-20 21:46:01 -05:00
parent 09e806bd3e
commit a330625804
2 changed files with 7 additions and 4 deletions

View File

@@ -39,9 +39,12 @@ export function isActiveBackendNode(node: LGraphNode, tag: string | null = null)
return false;
// Make sure this node is not contained in an inactive subgraph, even if the
// node itself is active
if (node.is(Subgraph) && !Array.from(node.iterateParentNodes()).every(n => isActiveNode(n, tag)))
// node itself is considered active
if (node.graph._is_subgraph) {
const isInsideDisabledSubgraph = Array.from(node.iterateParentSubgraphNodes()).some(n => !isActiveNode(n, tag))
if (isInsideDisabledSubgraph)
return false;
}
return true;
}