add optional chaining operator

pull/21833/head
dangwynne 2021-01-29 11:31:21 +00:00
parent 992247201e
commit dc81496c3b
1 changed files with 2 additions and 2 deletions

View File

@ -155,8 +155,8 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {
CommunityPrototypeStore.getUpdateEventName(this.props.room?.roomId),
this.onCommunityUpdate,
);
prevProps.room.off("Room.name", this.onRoomNameUpdate);
this.props.room.on("Room.name", this.onRoomNameUpdate);
prevProps.room?.off("Room.name", this.onRoomNameUpdate);
this.props.room?.on("Room.name", this.onRoomNameUpdate);
}
}