fix: extract WidgetCallbackOptions interface and add curly braces (#8791)

## Summary

improve for https://github.com/Comfy-Org/ComfyUI_frontend/pull/8774

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8791-fix-extract-WidgetCallbackOptions-interface-and-add-curly-braces-3046d73d365081c49e37c0a2596f1958)
by [Unito](https://www.unito.io)
This commit is contained in:
Terry Jia
2026-02-10 20:47:37 -05:00
committed by GitHub
parent f7b835e6a5
commit 10e9bc2f8d
3 changed files with 11 additions and 5 deletions

View File

@@ -1394,8 +1394,9 @@ export class ComfyApp {
// Allow widgets to run callbacks before a prompt has been queued
// e.g. random seed before every gen
forEachNode(this.rootGraph, (node) => {
for (const widget of node.widgets ?? [])
for (const widget of node.widgets ?? []) {
widget.beforeQueued?.({ isPartialExecution })
}
})
const p = await this.graphToPrompt(this.rootGraph)