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 and iamjoel committed Dec 16, 2024
1 parent 824877d commit ed234e8
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 ed234e8

Please sign in to comment.