瀏覽代碼

fix: value is not an array (#6632)

tags/0.6.16
crazywoola 1 年之前
父節點
當前提交
47b5bd7243
No account linked to committer's email address
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4
    1
      web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.tsx

+ 4
- 1
web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.tsx 查看文件

@@ -146,7 +146,10 @@ const VarReferencePicker: FC<Props> = ({
const varName = useMemo(() => {
if (hasValue) {
const isSystem = isSystemVar(value as ValueSelector)
const varName = value.length >= 3 ? (value as ValueSelector).slice(-2).join('.') : value[value.length - 1]
let varName = ''
if (Array.isArray(value))
varName = value.length >= 3 ? (value as ValueSelector).slice(-2).join('.') : value[value.length - 1]

return `${isSystem ? 'sys.' : ''}${varName}`
}
return ''

Loading…
取消
儲存