fix: empty object (conversation variable) editable (#11352)
This commit is contained in:
parent
5669cac16d
commit
20c4633d2a
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue