mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 04:45:55 +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
|
return objectPlaceholder
|
||||||
}, [type])
|
}, [type])
|
||||||
const getObjectValue = useCallback(() => {
|
const getObjectValue = useCallback(() => {
|
||||||
if (!chatVar)
|
if (!chatVar || Object.keys(chatVar.value).length === 0)
|
||||||
return [DEFAULT_OBJECT_VALUE]
|
return [DEFAULT_OBJECT_VALUE]
|
||||||
|
|
||||||
return Object.keys(chatVar.value).map((key) => {
|
return Object.keys(chatVar.value).map((key) => {
|
||||||
return {
|
return {
|
||||||
key,
|
key,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user