Skip to content

Commit dde8d9b

Browse files
committed
can't connect self
1 parent 8a2edab commit dde8d9b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot-full.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ export function useFullNodeConnecting({ widget, node_id, inputs, outputs }: {
2828
outputs = outputs || [];
2929

3030
const onMouseEnter = useCallback(() => {
31-
if (isConnecting) {
32-
setTryConnectThisNode(true);
31+
if (isConnecting && connectingParams) {
32+
if (connectingParams.nodeId !== node_id) {
33+
setTryConnectThisNode(true);
34+
}
3335
}
34-
}, [isConnecting])
36+
}, [isConnecting, connectingParams, node_id])
3537

3638
const onMouseLeave = useCallback(() => {
3739
if (tryConnectThisNode) {

0 commit comments

Comments
 (0)