File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -1520,15 +1520,16 @@ export class ComfyApp {
15201520
15211521 if ( ! def ?. input ) continue
15221522
1523- // @ts -expect-error fixme ts strict error
1524- for ( const widget of node . widgets ) {
1525- if ( widget . type === 'combo' ) {
1526- if ( def [ 'input' ] . required ?. [ widget . name ] !== undefined ) {
1527- // @ts -expect-error Requires discriminated union
1528- widget . options . values = def [ 'input' ] . required [ widget . name ] [ 0 ]
1529- } else if ( def [ 'input' ] . optional ?. [ widget . name ] !== undefined ) {
1530- // @ts -expect-error Requires discriminated union
1531- widget . options . values = def [ 'input' ] . optional [ widget . name ] [ 0 ]
1523+ if ( node . widgets ) {
1524+ for ( const widget of node . widgets ) {
1525+ if ( widget . type === 'combo' ) {
1526+ if ( def [ 'input' ] . required ?. [ widget . name ] !== undefined ) {
1527+ // @ts -expect-error Requires discriminated union
1528+ widget . options . values = def [ 'input' ] . required [ widget . name ] [ 0 ]
1529+ } else if ( def [ 'input' ] . optional ?. [ widget . name ] !== undefined ) {
1530+ // @ts -expect-error Requires discriminated union
1531+ widget . options . values = def [ 'input' ] . optional [ widget . name ] [ 0 ]
1532+ }
15321533 }
15331534 }
15341535 }
You can’t perform that action at this time.
0 commit comments