mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-27 17:52:16 +00:00
Fix remote widget undefined arg (#2551)
This commit is contained in:
@@ -47,9 +47,11 @@ export const useWidgetStore = defineStore('widget', () => {
|
||||
if (Array.isArray(inputData[0]))
|
||||
return getDefaultValue(transformComboInput(inputData))
|
||||
|
||||
const widgetType = getWidgetType(inputData[0], inputData[1].name)
|
||||
const widgetType = getWidgetType(inputData[0], inputData[1]?.name)
|
||||
|
||||
const [_, props] = inputData
|
||||
|
||||
if (!props) return undefined
|
||||
if (props.default) return props.default
|
||||
|
||||
if (widgetType === 'COMBO' && props.options?.length) return props.options[0]
|
||||
@@ -63,7 +65,7 @@ export const useWidgetStore = defineStore('widget', () => {
|
||||
'COMBO',
|
||||
{
|
||||
options: inputData[0],
|
||||
...Object(inputData[1])
|
||||
...Object(inputData[1] || {})
|
||||
}
|
||||
]
|
||||
: inputData
|
||||
|
||||
Reference in New Issue
Block a user