Skip to content

Commit 85a5d1e

Browse files
committed
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 Comfy-Org/litegraph.js#1193
1 parent 01e4260 commit 85a5d1e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,8 @@ export class ExecutableNodeDTO implements ExecutableLGraphNode {
126126

127127
/** Returns either the DTO itself, or the DTOs of the inner nodes of the subgraph. */
128128
getInnerNodes(): ExecutableLGraphNode[] {
129-
return this.subgraphNode
130-
? this.subgraphNode.getInnerNodes(
131-
this.nodesByExecutionId,
132-
this.subgraphNodePath
133-
)
129+
return this.node.isSubgraphNode()
130+
? this.node.getInnerNodes(this.nodesByExecutionId, this.subgraphNodePath)
134131
: [this]
135132
}
136133

0 commit comments

Comments
 (0)