1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-10 09:22:25 +03:00

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), CommunityPrototypeStore.getUpdateEventName(this.props.room?.roomId),
this.onCommunityUpdate, this.onCommunityUpdate,
); );
prevProps.room.off("Room.name", this.onRoomNameUpdate); prevProps.room?.off("Room.name", this.onRoomNameUpdate);
this.props.room.on("Room.name", this.onRoomNameUpdate); this.props.room?.on("Room.name", this.onRoomNameUpdate);
} }
} }