Skip to content

Commit a44e766

Browse files
committed
fix(tag-dropdown): remove parallel container from accessible references in parallel branches
1 parent b068b42 commit a44e766

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

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

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ import { SYSTEM_REFERENCE_PREFIXES } from '@/lib/workflows/sanitization/referenc
55
import { isInputDefinitionTrigger } from '@/lib/workflows/triggers/input-definition-triggers'
66
import { normalizeName } from '@/executor/constants'
77
import { useWorkflowStore } from '@/stores/workflows/workflow/store'
8-
import type { Loop, Parallel } from '@/stores/workflows/workflow/types'
8+
import type { Loop } from '@/stores/workflows/workflow/types'
99

1010
export function useAccessibleReferencePrefixes(blockId?: string | null): Set<string> | undefined {
11-
const { blocks, edges, loops, parallels } = useWorkflowStore(
11+
const { blocks, edges, loops } = useWorkflowStore(
1212
useShallow((state) => ({
1313
blocks: state.blocks,
1414
edges: state.edges,
1515
loops: state.loops || {},
16-
parallels: state.parallels || {},
1716
}))
1817
)
1918

@@ -40,14 +39,6 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str
4039
}
4140
})
4241

43-
const parallelValues = Object.values(parallels as Record<string, Parallel>)
44-
parallelValues.forEach((parallel) => {
45-
if (!parallel?.nodes) return
46-
if (parallel.nodes.includes(blockId)) {
47-
accessibleIds.add(parallel.id)
48-
}
49-
})
50-
5142
const prefixes = new Set<string>()
5243
accessibleIds.forEach((id) => {
5344
prefixes.add(normalizeName(id))
@@ -60,5 +51,5 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str
6051
SYSTEM_REFERENCE_PREFIXES.forEach((prefix) => prefixes.add(prefix))
6152

6253
return prefixes
63-
}, [blockId, blocks, edges, loops, parallels])
54+
}, [blockId, blocks, edges, loops])
6455
}

0 commit comments

Comments
 (0)