diff --git a/preset-text/presetText.js b/preset-text/presetText.js index 7720a21..30cc45d 100644 --- a/preset-text/presetText.js +++ b/preset-text/presetText.js @@ -195,8 +195,11 @@ app.registerExtension({ callbacks.push(widget.serializeValue); } + let called = false; const serializeValue = (workflowNode, widgetIndex) => { const widgetValue = widget.value; + if (called) return widgetValue; + called = true; for (const cb of callbacks) { widget.value = cb(workflowNode, widgetIndex); @@ -205,6 +208,8 @@ app.registerExtension({ const prompt = widget.value; widget.value = widgetValue; + called = false; + return prompt; };