diff --git a/src/HtmlUtils.js b/src/HtmlUtils.js index c621d8314e..8db17d6796 100644 --- a/src/HtmlUtils.js +++ b/src/HtmlUtils.js @@ -437,7 +437,7 @@ export function bodyToHtml(content, highlights, opts={}) { } let formattedBody = content.formatted_body; - if (opts.stripReplyFallback) formattedBody = ReplyThread.stripHTMLReply(content.formatted_body); + if (opts.stripReplyFallback && formattedBody) formattedBody = ReplyThread.stripHTMLReply(formattedBody); strippedBody = opts.stripReplyFallback ? ReplyThread.stripPlainReply(content.body) : content.body; bodyHasEmoji = containsEmoji(isHtml ? formattedBody : content.body);