Skip to content

Commit

Permalink
chore: check the legacy incompatible message type (#3248)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan authored Aug 5, 2024
1 parent f0f2307 commit c10caf8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ const SimpleTextMessage: React.FC<Props> = ({
const message = msg.content[0]
if (message && message.type === 'text') {
const textBlockContent = message as TextContentBlock
setText(textBlockContent.text.value)
// Check for compatible message object type - There was a problem with legacy message object compatibility, which broke the app.
if (typeof textBlockContent.text.value === 'string')
setText(textBlockContent.text.value)
}
}
}, [msg.content])
Expand Down

0 comments on commit c10caf8

Please sign in to comment.