add optional chaining operator

This commit is contained in:
dangwynne 2021-01-29 11:31:21 +00:00
parent 992247201e
commit dc81496c3b

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);
}
}