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

Commit b045a3d

Browse files
committed
Fix strict type issues
1 parent 8ef31d7 commit b045a3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/views/avatars/RoomAvatar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export default class RoomAvatar extends React.Component<IProps, IState> {
118118
Modal.createDialog(ImageView, params, "mx_Dialog_lightbox", null, true);
119119
};
120120

121-
private get roomIdName(): string {
121+
private get roomIdName(): string | undefined {
122122
const room = this.props.room;
123123

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

135-
return this.props.room.roomId || this.props.oobData.roomId;
135+
return this.props.room?.roomId || this.props.oobData?.roomId;
136136
}
137137

138138
public render() {

0 commit comments

Comments
 (0)