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

Commit

Permalink
Ensure UserInfo can be rendered without a room (#7687)
Browse files Browse the repository at this point in the history
Co-authored-by: David Baker <[email protected]>
  • Loading branch information
t3chguy and dbkr authored Feb 1, 2022
1 parent bfab09e commit afe6021
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/views/right_panel/UserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,7 @@ export type Member = User | RoomMember | GroupMember;
const UserInfoHeader: React.FC<{
member: Member;
e2eStatus: E2EStatus;
roomId: string;
roomId?: string;
}> = ({ member, e2eStatus, roomId }) => {
const cli = useContext(MatrixClientContext);
const statusMessage = useUserStatusMessage(member);
Expand Down Expand Up @@ -1710,7 +1710,7 @@ const UserInfo: React.FC<IProps> = ({

const header = <React.Fragment>
{ scopeHeader }
<UserInfoHeader member={member} e2eStatus={e2eStatus} roomId={room.roomId} />
<UserInfoHeader member={member} e2eStatus={e2eStatus} roomId={room?.roomId} />
</React.Fragment>;
return <BaseCard
className={classes.join(" ")}
Expand Down

0 comments on commit afe6021

Please sign in to comment.