From 43ab685e8d1982a671d09f96e4cc057c410e95e5 Mon Sep 17 00:00:00 2001 From: nipun-mallipeddi <105442557+nmscode@users.noreply.github.com> Date: Sat, 13 Aug 2022 00:12:45 -0400 Subject: [PATCH] fixed bug with User Appearance Settings Tab caused by changes in TextualBody.tsx --- src/components/views/messages/TextualBody.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/messages/TextualBody.tsx b/src/components/views/messages/TextualBody.tsx index 3ac7adf3da6..78a30e99271 100644 --- a/src/components/views/messages/TextualBody.tsx +++ b/src/components/views/messages/TextualBody.tsx @@ -575,7 +575,7 @@ export default class TextualBody extends React.Component { const client = MatrixClientPeg.get(); const room = client.getRoom(mxEvent.getRoomId()); //TODO: Decrypt emotes if encryption is added - let emotesEvent = room.currentState.getStateEvents("m.room.emotes", ""); + let emotesEvent = room?.currentState.getStateEvents("m.room.emotes", ""); let rawEmotes = emotesEvent ? (emotesEvent.getContent() || {}) : {}; let finalEmotes = {}; for (let key in rawEmotes) {