fix(core): prevent valid connections on same node and handle

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2022-12-06 17:39:43 +01:00
committed by Braks
parent 7ba6215542
commit a1e1304b63

View File

@@ -74,7 +74,7 @@ export const checkElementBelowIsValid = (
result.isValid =
(isFunction(isValidConnection)
? isValidConnection(connection, { edges, sourceNode: getNode(sourceId)!, targetNode: getNode(targetId)! })
: true) ||
: elementBelowNodeId !== nodeId || elementBelowHandleId !== handleId) ||
!result.connection.target ||
!result.connection.source
}