Use null guarded thread getter in EventTile (#7646)

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Germain 2022-01-26 17:51:15 +00:00 committed by GitHub
parent debf4caade
commit 00e868f371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -383,8 +383,8 @@ export default class EventTile extends React.Component<IProps, IState> {
constructor(props: IProps, context: React.ContextType<typeof MatrixClientContext>) {
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.