Skip to content

Commit b52f812

Browse files
fix(ui): duplicate edges on reconnect
Closes #7127
1 parent 05bed3f commit b52f812

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

invokeai/frontend/web/src/features/nodes/hooks/useConnection.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ export const useConnection = () => {
6464
const edgePendingUpdate = $edgePendingUpdate.get();
6565
const mouseOverNodeId = $mouseOverNode.get();
6666

67-
// If we are in the middle of an edge update, and the mouse isn't over a node, we should just bail so the edge
68-
// update logic can finish up
69-
if (edgePendingUpdate && !mouseOverNodeId) {
67+
// If we are in the middle of an edge update, and the mouse isn't over a node, OR we have just updated the edge,
68+
// we should just bail and let the edge update (i.e. reconnect) logic handle the connection
69+
if ((edgePendingUpdate && !mouseOverNodeId) || $didUpdateEdge.get()) {
7070
$pendingConnection.set(null);
7171
return;
7272
}

0 commit comments

Comments
 (0)