Skip to content

Commit 957d011

Browse files
authored
fix(core): fetch correct source and target nodes for isValidConnection (#1922)
* fix(core): fetch correct source and target nodes for isValidConnection Signed-off-by: braks <[email protected]> * chore(changeset): add --------- Signed-off-by: braks <[email protected]>
1 parent 18d103d commit 957d011

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/stale-phones-cross.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vue-flow/core": patch
3+
---
4+
5+
Fetch the correct source and target nodes for isValidConnection.

packages/core/src/utils/handle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ export function isValidHandle(
191191
isValidConnection(connection, {
192192
nodes,
193193
edges,
194-
sourceNode: findNode(fromNodeId)!,
195-
targetNode: findNode(handleNodeId)!,
194+
sourceNode: findNode(connection.source)!,
195+
targetNode: findNode(connection.target)!,
196196
})
197197

198198
result.toHandle = handle

0 commit comments

Comments
 (0)