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)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Dec 2, 2021
1 parent aa7cae0 commit b5a488b
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> {
}
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 b5a488b

Please sign in to comment.