From aae93a9af2807fc7d75d07ba6bb2c8befb6f3fea Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Wed, 26 Oct 2022 19:21:42 +0200 Subject: [PATCH] Cleaner test on body --- .../views/rooms/wysiwyg_composer/utils/createMessageContent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts b/src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts index e6a3baabdd..6d8a9f218e 100644 --- a/src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts +++ b/src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts @@ -44,7 +44,7 @@ function getHtmlReplyFallback(mxEvent: MatrixEvent): string { function getTextReplyFallback(mxEvent: MatrixEvent): string { const body = mxEvent.getContent().body; - if (!body || typeof body !== 'string') { + if (typeof body !== 'string') { return ""; } const lines = body.split("\n").map(l => l.trim());