From 3a0dc0fff6d457d98477e856c12e2a32a31b2aa5 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Thu, 8 Feb 2024 10:47:38 +0100 Subject: [PATCH] feat(core,composables): add `edgeId` to `useHandleConnections` return --- packages/core/src/utils/store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/utils/store.ts b/packages/core/src/utils/store.ts index 24d645fe..8333a9f0 100644 --- a/packages/core/src/utils/store.ts +++ b/packages/core/src/utils/store.ts @@ -130,14 +130,14 @@ export function updateConnectionLookup(connectionLookup: ConnectionLookup, edges connectionLookup.clear() for (const edge of edges) { - const { source, target, sourceHandle = null, targetHandle = null } = edge + const { id: edgeId, source, target, sourceHandle = null, targetHandle = null } = edge const sourceKey = `${source}-source-${sourceHandle}` const targetKey = `${target}-target-${targetHandle}` const prevSource = connectionLookup.get(sourceKey) || new Map() const prevTarget = connectionLookup.get(targetKey) || new Map() - const connection = markRaw({ source, target, sourceHandle, targetHandle }) + const connection = markRaw({ edgeId, source, target, sourceHandle, targetHandle }) connectionLookup.set(sourceKey, prevSource.set(`${target}-${targetHandle}`, connection)) connectionLookup.set(targetKey, prevTarget.set(`${source}-${sourceHandle}`, connection))