Skip to content

Commit 076e1ec

Browse files
committed
fix(subflows): add loops/parallels to accessible list of blocks in the tag dropdown when contained withitn a subflow
1 parent a7fe1d3 commit 076e1ec

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str
3838
loopValues.forEach((loop) => {
3939
if (!loop?.nodes) return
4040
if (loop.nodes.includes(blockId)) {
41+
accessibleIds.add(loop.id) // Add the loop block itself
4142
loop.nodes.forEach((nodeId) => accessibleIds.add(nodeId))
4243
}
4344
})
@@ -46,6 +47,7 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str
4647
parallelValues.forEach((parallel) => {
4748
if (!parallel?.nodes) return
4849
if (parallel.nodes.includes(blockId)) {
50+
accessibleIds.add(parallel.id) // Add the parallel block itself
4951
parallel.nodes.forEach((nodeId) => accessibleIds.add(nodeId))
5052
}
5153
})

0 commit comments

Comments
 (0)