fix(core): use correct handlesuffix in getHandleConnections (#1880)

* fix(core): use correct handlesuffix in `getHandleConnections`

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(changeset): add

---------

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2025-06-20 08:30:36 +02:00
parent b5c4c0e3f5
commit a43da6f1ec
3 changed files with 29 additions and 6 deletions

View File

@@ -73,7 +73,8 @@ export function useActions(state: State, nodeLookup: ComputedRef<NodeLookup>, ed
}
const getHandleConnections: Actions['getHandleConnections'] = ({ id, type, nodeId }) => {
return Array.from(state.connectionLookup.get(`${nodeId}-${type}-${id ?? null}`)?.values() ?? [])
const handleSuffix = id ? `-${type}-${id}` : `-${type}`
return Array.from(state.connectionLookup.get(`${nodeId}${handleSuffix}`)?.values() ?? [])
}
const findNode: Actions['findNode'] = (id) => {