diff --git a/src/components/views/rooms/EditMessageComposer.tsx b/src/components/views/rooms/EditMessageComposer.tsx index a9f756d1c2..52312e1a99 100644 --- a/src/components/views/rooms/EditMessageComposer.tsx +++ b/src/components/views/rooms/EditMessageComposer.tsx @@ -60,9 +60,6 @@ function getHtmlReplyFallback(mxEvent: MatrixEvent): string { function getTextReplyFallback(mxEvent: MatrixEvent): string { const body = mxEvent.getContent().body; - if (!body || typeof body !== 'string') { - return ""; - } const lines = body.split("\n").map(l => l.trim()); if (lines.length > 2 && lines[0].startsWith("> ") && lines[1].length === 0) { return `${lines[0]}\n\n`; diff --git a/src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts b/src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts index bdf07fb15e..e6a3baabdd 100644 --- a/src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts +++ b/src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts @@ -44,6 +44,9 @@ function getHtmlReplyFallback(mxEvent: MatrixEvent): string { function getTextReplyFallback(mxEvent: MatrixEvent): string { const body = mxEvent.getContent().body; + if (!body || typeof body !== 'string') { + return ""; + } const lines = body.split("\n").map(l => l.trim()); if (lines.length > 2 && lines[0].startsWith("> ") && lines[1].length === 0) { return `${lines[0]}\n\n`;