Fix CallPreview room is null
(#7265)
This commit is contained in:
parent
aa7cae08aa
commit
b5a488b01b
1 changed files with 3 additions and 1 deletions
|
@ -133,8 +133,10 @@ export default class CallPreview extends React.Component<IProps, IState> {
|
||||||
}
|
}
|
||||||
SettingsStore.unwatchSetting(this.settingsWatcherRef);
|
SettingsStore.unwatchSetting(this.settingsWatcherRef);
|
||||||
const room = MatrixClientPeg.get().getRoom(this.state.roomId);
|
const room = MatrixClientPeg.get().getRoom(this.state.roomId);
|
||||||
|
if (room) {
|
||||||
WidgetLayoutStore.instance.off(WidgetLayoutStore.emissionForRoom(room), this.updateCalls);
|
WidgetLayoutStore.instance.off(WidgetLayoutStore.emissionForRoom(room), this.updateCalls);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private onRoomViewStoreUpdate = () => {
|
private onRoomViewStoreUpdate = () => {
|
||||||
const newRoomId = RoomViewStore.getRoomId();
|
const newRoomId = RoomViewStore.getRoomId();
|
||||||
|
|
Loading…
Reference in a new issue