fix: element of Array[string] and Array[number] and size attribution (#23074)

Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
呆萌闷油瓶 2025-07-30 15:21:50 +08:00 • committed by GitHub
commit 11ec62ca70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 70 additions and 42 deletions

View file

@ -28,3 +28,13 @@ export const findVariableWhenOnLLMVision = (valueSelector: ValueSelector, availa
formType,
}
}
export const getConditionValueAsString = (condition: { value: any }) => {
if (Array.isArray(condition.value))
return condition.value[0] ?? ''
if (typeof condition.value === 'number')
return String(condition.value)
return condition.value ?? ''
}