Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix strict type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
weeman1337 committed Jan 4, 2023
1 parent 8ef31d7 commit b045a3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/views/avatars/RoomAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default class RoomAvatar extends React.Component<IProps, IState> {
Modal.createDialog(ImageView, params, "mx_Dialog_lightbox", null, true);
};

private get roomIdName(): string {
private get roomIdName(): string | undefined {
const room = this.props.room;

if (room) {
Expand All @@ -132,7 +132,7 @@ export default class RoomAvatar extends React.Component<IProps, IState> {
}
}

return this.props.room.roomId || this.props.oobData.roomId;
return this.props.room?.roomId || this.props.oobData?.roomId;
}

public render() {
Expand Down

0 comments on commit b045a3d

Please sign in to comment.