Skip to content

Commit

Permalink
fix: empty object (conversation variable) editable (#11352)
Browse files Browse the repository at this point in the history
  • Loading branch information
YIXIAO0 authored Dec 5, 2024
1 parent 5669cac commit 20c4633
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 20c4633

Please sign in to comment.