check if workflowNode And widgets_values are defined as they were causing errors on QueuePrompt after loading workFlow

This commit is contained in:
omar92 2023-04-03 22:01:18 +02:00
parent 4e43758236
commit ca2ae98470

View File

@ -30,7 +30,8 @@ app.registerExtension({
}
// Overwrite the value in the serialized workflow pnginfo
workflowNode.widgets_values[widgetIndex] = prompt;
if (workflowNode?.widgets_values)
workflowNode.widgets_values[widgetIndex] = prompt;
return prompt;
};