Fix issue when node_input is undefined.

This commit is contained in:
comfyanonymous 2023-09-02 12:17:30 -04:00
parent 7291e303f6
commit 6962cb46a9
1 changed files with 3 additions and 2 deletions

View File

@ -19,8 +19,9 @@ function hideWidget(node, widget, suffix = "") {
if (!node.inputs) {
return undefined;
}
const { link } = node.inputs.find((i) => i.widget?.name === widget.name);
if (link == null) {
let node_input = node.inputs.find((i) => i.widget?.name === widget.name);
if (!node_input || !node_input.link) {
return undefined;
}
return widget.origSerializeValue ? widget.origSerializeValue() : widget.value;