Prevent recursive call on hidden widgets
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user