From 9586de9dc8eccb7f9c4934b7661a90fb208a81a8 Mon Sep 17 00:00:00 2001 From: flyingshutter Date: Sat, 1 Apr 2023 17:30:47 +0200 Subject: [PATCH] fix client freeze on connect reroutes in a circle --- web/extensions/core/rerouteNode.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/extensions/core/rerouteNode.js b/web/extensions/core/rerouteNode.js index 7188dfd2..1342cae9 100644 --- a/web/extensions/core/rerouteNode.js +++ b/web/extensions/core/rerouteNode.js @@ -43,8 +43,15 @@ app.registerExtension({ const node = app.graph.getNodeById(link.origin_id); const type = node.constructor.type; if (type === "Reroute") { + if (node === this) { + // We've found a circle + currentNode.disconnectInput(link.target_slot); + currentNode = null; + } + else { // Move the previous node - currentNode = node; + currentNode = node; + } } else { // We've found the end inputNode = currentNode;