[Type] Disallow type upcasting for node input spec (#2790)

This commit is contained in:
Chenlei Hu
2025-03-01 16:58:45 -05:00
committed by GitHub
parent bca0af82a3
commit 09ab14ac81
20 changed files with 136 additions and 109 deletions

View File

@@ -1606,8 +1606,10 @@ export class ComfyApp {
const widget = node.widgets[widgetNum]
if (widget.type === 'combo') {
if (def['input'].required?.[widget.name] !== undefined) {
// @ts-expect-error InputSpec is not typed correctly
widget.options.values = def['input'].required[widget.name][0]
} else if (def['input'].optional?.[widget.name] !== undefined) {
// @ts-expect-error InputSpec is not typed correctly
widget.options.values = def['input'].optional[widget.name][0]
}
}