mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 19:28:59 +08:00
fix: empty object (conversation variable) editable (#11352)
This commit is contained in:
parent
5669cac16d
commit
20c4633d2a
@ -97,8 +97,9 @@ const ChatVariableModal = ({
|
||||
return objectPlaceholder
|
||||
}, [type])
|
||||
const getObjectValue = useCallback(() => {
|
||||
if (!chatVar)
|
||||
if (!chatVar || Object.keys(chatVar.value).length === 0)
|
||||
return [DEFAULT_OBJECT_VALUE]
|
||||
|
||||
return Object.keys(chatVar.value).map((key) => {
|
||||
return {
|
||||
key,
|
||||
|
Loading…
x
Reference in New Issue
Block a user