diff --git a/src/app/components/message/Reply.tsx b/src/app/components/message/Reply.tsx index 495e09093..6672e5641 100644 --- a/src/app/components/message/Reply.tsx +++ b/src/app/components/message/Reply.tsx @@ -71,10 +71,11 @@ export const replyPreviewBodyForTimelineEvent = ( return 'Sticker'; } - const msgtype = content.msgtype; - if (typeof msgtype !== 'string') { + const rawMsgtype = content.msgtype; + if (typeof rawMsgtype !== 'string') { return ; } + const msgtype = rawMsgtype as MsgType; const trimmedBody = nonEmptyTrimmed( typeof content.body === 'string' ? trimReplyFromBody(content.body) : ''