mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-25 19:51:39 +01:00
Fallback to empty string if content is undefined
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
577883a1d4
commit
070bc96186
@ -20,7 +20,7 @@ import { MessageBodyBuilder } from "../MessageBodyBuilder.js";
|
|||||||
export class TextTile extends MessageTile {
|
export class TextTile extends MessageTile {
|
||||||
get messageFormat() {
|
get messageFormat() {
|
||||||
const content = this._getContent();
|
const content = this._getContent();
|
||||||
let body = content && content.body;
|
let body = content?.body || "";
|
||||||
if (content.msgtype === "m.emote") {
|
if (content.msgtype === "m.emote") {
|
||||||
body = `* ${this.displayName} ${body}`;
|
body = `* ${this.displayName} ${body}`;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user