Conform more of the codebase to strictNullChecks (#10800)

This commit is contained in:
Michael Telatynski
2023-05-10 08:41:55 +01:00
committed by GitHub
parent adb29b38a3
commit 456c66db5b
46 changed files with 147 additions and 123 deletions

View File

@@ -45,7 +45,7 @@ export default class MVideoBody extends React.PureComponent<IBodyProps, IState>
public context!: React.ContextType<typeof RoomContext>;
private videoRef = React.createRef<HTMLVideoElement>();
private sizeWatcher: string;
private sizeWatcher?: string;
public constructor(props: IBodyProps) {
super(props);
@@ -187,7 +187,7 @@ export default class MVideoBody extends React.PureComponent<IBodyProps, IState>
}
public componentWillUnmount(): void {
SettingsStore.unwatchSetting(this.sizeWatcher);
if (this.sizeWatcher) SettingsStore.unwatchSetting(this.sizeWatcher);
}
private videoOnPlay = async (): Promise<void> => {