Skip to content

Commit 3a0dc0f

Browse files
committed
feat(core,composables): add edgeId to useHandleConnections return
1 parent bc0a33d commit 3a0dc0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/utils/store.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ export function updateConnectionLookup(connectionLookup: ConnectionLookup, edges
130130
connectionLookup.clear()
131131

132132
for (const edge of edges) {
133-
const { source, target, sourceHandle = null, targetHandle = null } = edge
133+
const { id: edgeId, source, target, sourceHandle = null, targetHandle = null } = edge
134134

135135
const sourceKey = `${source}-source-${sourceHandle}`
136136
const targetKey = `${target}-target-${targetHandle}`
137137

138138
const prevSource = connectionLookup.get(sourceKey) || new Map()
139139
const prevTarget = connectionLookup.get(targetKey) || new Map()
140-
const connection = markRaw({ source, target, sourceHandle, targetHandle })
140+
const connection = markRaw({ edgeId, source, target, sourceHandle, targetHandle })
141141

142142
connectionLookup.set(sourceKey, prevSource.set(`${target}-${targetHandle}`, connection))
143143
connectionLookup.set(targetKey, prevTarget.set(`${source}-${sourceHandle}`, connection))

0 commit comments

Comments
 (0)