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

Commit b5a488b

Browse files
authored
Fix CallPreview room is null (#7265)
1 parent aa7cae0 commit b5a488b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/views/voip/CallPreview.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ export default class CallPreview extends React.Component<IProps, IState> {
133133
}
134134
SettingsStore.unwatchSetting(this.settingsWatcherRef);
135135
const room = MatrixClientPeg.get().getRoom(this.state.roomId);
136-
WidgetLayoutStore.instance.off(WidgetLayoutStore.emissionForRoom(room), this.updateCalls);
136+
if (room) {
137+
WidgetLayoutStore.instance.off(WidgetLayoutStore.emissionForRoom(room), this.updateCalls);
138+
}
137139
}
138140

139141
private onRoomViewStoreUpdate = () => {

0 commit comments

Comments
 (0)