From d4e73878e2467c561ecdb82c465d099010a8de33 Mon Sep 17 00:00:00 2001 From: space-nuko <24979496+space-nuko@users.noreply.github.com> Date: Fri, 2 Jun 2023 10:56:32 -0500 Subject: [PATCH] Support previously saved workflows --- web/scripts/widgets.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/scripts/widgets.js b/web/scripts/widgets.js index 1b7bbfe99..308e8ad61 100644 --- a/web/scripts/widgets.js +++ b/web/scripts/widgets.js @@ -453,11 +453,6 @@ async function loadImageAsync(imageURL) { } const MULTIIMAGEUPLOAD = (node, inputName, inputData, app) => { - console.error("LOADDATA", node, inputName, inputData) - if (typeof inputData === "string") { - inputData = [inputData] - } - const imagesWidget = node.addWidget("text", inputName, inputData, () => {}) imagesWidget.disabled = true; @@ -488,6 +483,9 @@ const MULTIIMAGEUPLOAD = (node, inputName, inputData, app) => { var default_value = imagesWidget.value; Object.defineProperty(imagesWidget, "value", { set : function(value) { + if (typeof value === "string") { + value = [value] + } this._real_value = value; },