Skip to content

Commit ed6e15d

Browse files
committed
Fix subgraphs linked to each other corrupt execution
1 parent 341f8da commit ed6e15d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils/executionUtil.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ export const graphToPrompt = async (
134134
link = parent.getInputLink(link.origin_slot)
135135
if (!link) break
136136

137-
parent = parent.getInputNode(link.target_slot)
137+
parent = parent.isSubgraphNode()
138+
? parent.getInputNodeFromSubgraph(link.target_slot)
139+
: parent.getInputNode(link.target_slot)
140+
138141
if (!parent) break
139142
} else if (!parent.inputs) {
140143
// Maintains existing behaviour if parent.getInputLink is overriden

0 commit comments

Comments
 (0)