fix client freeze on connect reroutes in a circle
This commit is contained in:
parent
0d972b85e6
commit
9586de9dc8
|
@ -43,8 +43,15 @@ app.registerExtension({
|
||||||
const node = app.graph.getNodeById(link.origin_id);
|
const node = app.graph.getNodeById(link.origin_id);
|
||||||
const type = node.constructor.type;
|
const type = node.constructor.type;
|
||||||
if (type === "Reroute") {
|
if (type === "Reroute") {
|
||||||
|
if (node === this) {
|
||||||
|
// We've found a circle
|
||||||
|
currentNode.disconnectInput(link.target_slot);
|
||||||
|
currentNode = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
// Move the previous node
|
// Move the previous node
|
||||||
currentNode = node;
|
currentNode = node;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// We've found the end
|
// We've found the end
|
||||||
inputNode = currentNode;
|
inputNode = currentNode;
|
||||||
|
|
Loading…
Reference in New Issue