mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Fix exception when stripping replies from an event with a null body
This commit is contained in:
parent
be2d0c9de7
commit
718eeb4a81
1 changed files with 1 additions and 1 deletions
|
@ -421,7 +421,7 @@ export function bodyToHtml(content: IContent, highlights: string[], opts: IOpts
|
|||
}
|
||||
|
||||
let formattedBody = typeof content.formatted_body === 'string' ? content.formatted_body : null;
|
||||
const plainBody = typeof content.body === 'string' ? content.body : null;
|
||||
const plainBody = typeof content.body === 'string' ? content.body : "";
|
||||
|
||||
if (opts.stripReplyFallback && formattedBody) formattedBody = ReplyThread.stripHTMLReply(formattedBody);
|
||||
strippedBody = opts.stripReplyFallback ? ReplyThread.stripPlainReply(plainBody) : plainBody;
|
||||
|
|
Loading…
Reference in a new issue