Fix CallPreview room is null (#7265)
This commit is contained in:
@@ -133,7 +133,9 @@ 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);
|
||||||
WidgetLayoutStore.instance.off(WidgetLayoutStore.emissionForRoom(room), this.updateCalls);
|
if (room) {
|
||||||
|
WidgetLayoutStore.instance.off(WidgetLayoutStore.emissionForRoom(room), this.updateCalls);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private onRoomViewStoreUpdate = () => {
|
private onRoomViewStoreUpdate = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user