Invalidate a Node trying to connect itself with the same handle
It also be written as `!(elementBelowNodeId === nodeId && elementBelowHandleId === handleId)`
This commit is contained in:
@@ -60,7 +60,7 @@ export function checkElementBelowIsValid(
|
||||
const isValid =
|
||||
connectionMode === ConnectionMode.Strict
|
||||
? (isTarget && elementBelowIsSource) || (!isTarget && elementBelowIsTarget)
|
||||
: true;
|
||||
: elementBelowNodeId !== nodeId || elementBelowHandleId !== handleId;
|
||||
|
||||
if (isValid) {
|
||||
result.isValid = isValidConnection(connection);
|
||||
|
||||
Reference in New Issue
Block a user