mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
Fix inconsistent subgraphNode usage
Prior to this commit, subgraphNode inconsistently refers to either the parent graph, or to indicate the current node is a subgraph. This corrects the usage of subgraphNode to consistently refer to the subgraph instance as defined in the constructor. This solves a bug where graph serialization fails due to an incorrectly reported infinite loop. Port of https://github.com/Comfy-Org/litegraph.js/pull/1193
This commit is contained in:
@@ -126,11 +126,8 @@ export class ExecutableNodeDTO implements ExecutableLGraphNode {
|
||||
|
||||
/** Returns either the DTO itself, or the DTOs of the inner nodes of the subgraph. */
|
||||
getInnerNodes(): ExecutableLGraphNode[] {
|
||||
return this.subgraphNode
|
||||
? this.subgraphNode.getInnerNodes(
|
||||
this.nodesByExecutionId,
|
||||
this.subgraphNodePath
|
||||
)
|
||||
return this.node.isSubgraphNode()
|
||||
? this.node.getInnerNodes(this.nodesByExecutionId, this.subgraphNodePath)
|
||||
: [this]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user