mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-08 22:48:14 -05:00
fix(subflows): prevent cross-boundary connections on autoconnect drop between subflow blocks and regular blocks (#2366)
This commit is contained in:
@@ -579,8 +579,10 @@ const WorkflowContent = React.memo(() => {
|
||||
const node = nodeIndex.get(id)
|
||||
if (!node) return false
|
||||
|
||||
// If dropping outside containers, ignore blocks that are inside a container
|
||||
if (!containerAtPoint && blocks[id]?.data?.parentId) return false
|
||||
const blockParentId = blocks[id]?.data?.parentId
|
||||
const dropParentId = containerAtPoint?.loopId
|
||||
if (dropParentId !== blockParentId) return false
|
||||
|
||||
return true
|
||||
})
|
||||
.map(([id, block]) => {
|
||||
|
||||
Reference in New Issue
Block a user