Skip to content

Commit 0fb084b

Browse files
authored
fix(subflows): prevent cross-boundary connections on autoconnect drop between subflow blocks and regular blocks (#2366)
1 parent 95b9ca4 commit 0fb084b

File tree

1 file changed

+4
-2
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,10 @@ const WorkflowContent = React.memo(() => {
579579
const node = nodeIndex.get(id)
580580
if (!node) return false
581581

582-
// If dropping outside containers, ignore blocks that are inside a container
583-
if (!containerAtPoint && blocks[id]?.data?.parentId) return false
582+
const blockParentId = blocks[id]?.data?.parentId
583+
const dropParentId = containerAtPoint?.loopId
584+
if (dropParentId !== blockParentId) return false
585+
584586
return true
585587
})
586588
.map(([id, block]) => {

0 commit comments

Comments
 (0)