diff --git a/web/app/components/workflow/nodes/_base/components/variable/utils.ts b/web/app/components/workflow/nodes/_base/components/variable/utils.ts index ee3a70456b..1c396be536 100644 --- a/web/app/components/workflow/nodes/_base/components/variable/utils.ts +++ b/web/app/components/workflow/nodes/_base/components/variable/utils.ts @@ -235,6 +235,8 @@ const matchNotSystemVars = (prompts: string[]) => { const allVars: string[] = [] prompts.forEach((prompt) => { VAR_REGEX.lastIndex = 0 + if (typeof prompt !== 'string') + return allVars.push(...(prompt.match(VAR_REGEX) || [])) }) const uniqVars = uniq(allVars).map(v => v.replaceAll('{{#', '').replace('#}}', '').split('.'))