Fix uploaded image not forcing re-render (#3115)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Christian Byrne
2025-03-17 17:13:05 -07:00
committed by GitHub
parent da415e9d80
commit 26a7ebdd77
6 changed files with 105 additions and 10 deletions

View File

@@ -115,8 +115,20 @@ export class NodeWidgetReference {
}
)
}
}
async getValue() {
return await this.node.comfyPage.page.evaluate(
([id, index]) => {
const node = window['app'].graph.getNodeById(id)
if (!node) throw new Error(`Node ${id} not found.`)
const widget = node.widgets[index]
if (!widget) throw new Error(`Widget ${index} not found.`)
return widget.value
},
[this.node.id, this.index] as const
)
}
}
export class NodeReference {
constructor(
readonly id: NodeId,