Skip to content

Commit 9d7ab37

Browse files
committed
Fix autoconnect edge for router
1 parent b65a9d3 commit 9d7ab37

File tree

1 file changed

+8
-0
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]

1 file changed

+8
-0
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,14 @@ const WorkflowContent = React.memo(() => {
969969
const handleId = conditionHandles[0].getAttribute('data-handleid')
970970
if (handleId) return handleId
971971
}
972+
} else if (block.type === 'router_v2') {
973+
const routerHandles = document.querySelectorAll(
974+
`[data-nodeid^="${block.id}"][data-handleid^="router-"]`
975+
)
976+
if (routerHandles.length > 0) {
977+
const handleId = routerHandles[0].getAttribute('data-handleid')
978+
if (handleId) return handleId
979+
}
972980
} else if (block.type === 'loop') {
973981
return 'loop-end-source'
974982
} else if (block.type === 'parallel') {

0 commit comments

Comments
 (0)