mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-13 18:36:04 +08:00
fix: value is not an array (#6632)
This commit is contained in:
parent
d4c55748f1
commit
47b5bd7243
@ -146,7 +146,10 @@ const VarReferencePicker: FC<Props> = ({
|
|||||||
const varName = useMemo(() => {
|
const varName = useMemo(() => {
|
||||||
if (hasValue) {
|
if (hasValue) {
|
||||||
const isSystem = isSystemVar(value as ValueSelector)
|
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 `${isSystem ? 'sys.' : ''}${varName}`
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user