forked from mystiq/hydrogen-web
Fallback to empty string if content is undefined
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
577883a1d4
commit
070bc96186
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ import { MessageBodyBuilder } from "../MessageBodyBuilder.js";
|
|||
export class TextTile extends MessageTile {
|
||||
get messageFormat() {
|
||||
const content = this._getContent();
|
||||
let body = content && content.body;
|
||||
let body = content?.body || "";
|
||||
if (content.msgtype === "m.emote") {
|
||||
body = `* ${this.displayName} ${body}`;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue