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:
@@ -74,7 +74,7 @@ export const checkElementBelowIsValid = (
|
|||||||
result.isValid =
|
result.isValid =
|
||||||
(isFunction(isValidConnection)
|
(isFunction(isValidConnection)
|
||||||
? isValidConnection(connection, { edges, sourceNode: getNode(sourceId)!, targetNode: getNode(targetId)! })
|
? isValidConnection(connection, { edges, sourceNode: getNode(sourceId)!, targetNode: getNode(targetId)! })
|
||||||
: true) ||
|
: elementBelowNodeId !== nodeId || elementBelowHandleId !== handleId) ||
|
||||||
!result.connection.target ||
|
!result.connection.target ||
|
||||||
!result.connection.source
|
!result.connection.source
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user