Fix error translating legacy setting options (#2648)

This commit is contained in:
bymyself
2025-02-20 08:12:46 -07:00
committed by GitHub
parent fbb6c2f825
commit 365fd1e047
3 changed files with 59 additions and 1 deletions

View File

@@ -69,7 +69,12 @@ test('collect-i18n-general', async ({ comfyPage }) => {
name: setting.name,
tooltip: setting.tooltip,
category: setting.category,
options: setting.options
options:
typeof setting.options === 'function'
? // @ts-expect-error: Audit and deprecate usage of legacy options type:
// (value) => [string | {text: string, value: string}]
setting.options(setting.defaultValue ?? '')
: setting.options
}))
})