Browse Source

Fix issue with some workflows not getting serialized.

pull/1407/head
comfyanonymous 1 year ago
parent
commit
7291e303f6
  1. 3
      web/extensions/core/widgetInputs.js

3
web/extensions/core/widgetInputs.js

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

Loading…
Cancel
Save