mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-27 23:00:20 +08:00
not losing connection all time
This commit is contained in:
parent
eee94c1fce
commit
82da0ec4f6
@ -93,8 +93,9 @@ app.registerExtension({
|
|||||||
const nodeOutType = node.inputs && node.inputs[link?.target_slot] && node.inputs[link.target_slot].type ? node.inputs[link.target_slot].type : null;
|
const nodeOutType = node.inputs && node.inputs[link?.target_slot] && node.inputs[link.target_slot].type ? node.inputs[link.target_slot].type : null;
|
||||||
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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user