Skip to content

Commit 67657b9

Browse files
committed
fix more multiselect issues
1 parent 972d0a5 commit 67657b9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-canvas-helpers.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,10 @@ export function getEdgeSelectionContextId(
236236
): string | null {
237237
const sourceNode = nodes.find((node) => node.id === edge.source)
238238
const targetNode = nodes.find((node) => node.id === edge.target)
239-
if (sourceNode) return getNodeSelectionContextId(sourceNode, blocks)
240-
if (targetNode) return getNodeSelectionContextId(targetNode, blocks)
239+
const sourceContextId = sourceNode ? getNodeSelectionContextId(sourceNode, blocks) : null
240+
const targetContextId = targetNode ? getNodeSelectionContextId(targetNode, blocks) : null
241+
if (sourceContextId) return sourceContextId
242+
if (targetContextId) return targetContextId
241243
return null
242244
}
243245

0 commit comments

Comments
 (0)