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

Commit

Permalink
Fix CallPreview room is null (#7265) (#7348)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Telatynski <[email protected]>
  • Loading branch information
dbkr and t3chguy authored Dec 13, 2021
1 parent b54a6d5 commit 2ceed00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/views/voip/CallPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ export default class CallPreview extends React.Component<IProps, IState> {
dis.unregister(this.dispatcherRef);
SettingsStore.unwatchSetting(this.settingsWatcherRef);
const room = MatrixClientPeg.get().getRoom(this.state.roomId);
WidgetLayoutStore.instance.off(WidgetLayoutStore.emissionForRoom(room), this.updateCalls);
if (room) {
WidgetLayoutStore.instance.off(WidgetLayoutStore.emissionForRoom(room), this.updateCalls);
}
}

private onRoomViewStoreUpdate = () => {
Expand Down

0 comments on commit 2ceed00

Please sign in to comment.