From 00e868f371cfa355581c0b113b13a960170d2b37 Mon Sep 17 00:00:00 2001 From: Germain Date: Wed, 26 Jan 2022 17:51:15 +0000 Subject: [PATCH] Use null guarded thread getter in EventTile (#7646) Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/rooms/EventTile.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 615a0d9eae..4b011acfeb 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -383,8 +383,8 @@ export default class EventTile extends React.Component { constructor(props: IProps, context: React.ContextType) { super(props, context); - const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId()); - const thread = room.threads?.get(this.props.mxEvent.getId()); + this.context = context; + const thread = this.thread; this.state = { // Whether the action bar is focused.