mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-03-13 14:21:20 +00:00
Fixed crash removing nodes
due to output link is still being set but not valid
This commit is contained in:
parent
c0f5325018
commit
52e74a2bb2
@ -107,12 +107,18 @@ app.registerExtension({
|
||||
node.size = node.computeSize();
|
||||
|
||||
for (const l of node.outputs[0].links || []) {
|
||||
app.graph.links[l].color = color;
|
||||
const link = app.graph.links[l];
|
||||
if (link) {
|
||||
link.color = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (inputNode) {
|
||||
app.graph.links[inputNode.inputs[0].link].color = color;
|
||||
const link = app.graph.links[inputNode.inputs[0].link];
|
||||
if (link) {
|
||||
link.color = color;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user