Fix issue with some workflows not getting serialized.

This commit is contained in:
comfyanonymous 2023-09-02 11:48:44 -04:00
parent 77a176f9e0
commit 7291e303f6
1 changed files with 3 additions and 0 deletions

View File

@ -16,6 +16,9 @@ function hideWidget(node, widget, suffix = "") {
widget.type = CONVERTED_TYPE + suffix;
widget.serializeValue = () => {
// Prevent serializing the widget if we have no input linked
if (!node.inputs) {
return undefined;
}
const { link } = node.inputs.find((i) => i.widget?.name === widget.name);
if (link == null) {
return undefined;