not losing connection all time

This commit is contained in:
omar92 2023-04-08 20:18:24 +02:00
parent eee94c1fce
commit 82da0ec4f6

View File

@ -94,7 +94,8 @@ app.registerExtension({
if (inputType && nodeOutType !== inputType) { if (inputType && nodeOutType !== inputType) {
// The output doesnt match our input so disconnect it // The output doesnt match our input so disconnect it
console.log("Disconnecting", { "node": node }, "as it doesnt match type of ", { "inputNode": inputNode }); console.log("Disconnecting", { "node": node }, "as it doesnt match type of ", { "inputNode": inputNode });
console.log("Input type:", inputType, "Output type:", nodeOutType);
if (inputNode.type !== "Reroute")
node.disconnectInput(link.target_slot); node.disconnectInput(link.target_slot);
} else { } else {
outputType = nodeOutType; outputType = nodeOutType;