From 7291e303f662f35bc545a8aaa0020558e82a8ca9 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sat, 2 Sep 2023 11:48:44 -0400 Subject: [PATCH] Fix issue with some workflows not getting serialized. --- web/extensions/core/widgetInputs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/extensions/core/widgetInputs.js b/web/extensions/core/widgetInputs.js index a6b1a1d..34c656d 100644 --- a/web/extensions/core/widgetInputs.js +++ b/web/extensions/core/widgetInputs.js @@ -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;