fix: don't cast message.content

This commit is contained in:
Paul Makles 2022-05-07 16:55:46 +01:00
parent ce5dedcecf
commit 7ffa0744c0
2 changed files with 8 additions and 6 deletions

View file

@ -223,9 +223,10 @@ export const MessageReply = observer(
)}
<Markdown
disallowBigEmoji
content={(
message.content as string
).replace(/\n/g, " ")}
content={message.content?.replace(
/\n/g,
" ",
)}
/>
</div>
</>

View file

@ -187,9 +187,10 @@ export default observer(({ channel, replies, setReplies }: Props) => {
) : (
<Markdown
disallowBigEmoji
content={(
message.content as string
).replace(/\n/g, " ")}
content={message.content?.replace(
/\n/g,
" ",
)}
/>
)}
</div>