Improve quality of Typescript types (#10742)

This commit is contained in:
Michael Telatynski 2023-05-05 09:11:14 +01:00 committed by GitHub
parent 542bf68c63
commit a4f0b80692
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 74 additions and 75 deletions

View file

@ -87,7 +87,7 @@ interface IState {
}
export default class SecurityUserSettingsTab extends React.Component<IProps, IState> {
private dispatcherRef: string;
private dispatcherRef?: string;
public constructor(props: IProps) {
super(props);
@ -124,7 +124,7 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
}
public componentWillUnmount(): void {
dis.unregister(this.dispatcherRef);
if (this.dispatcherRef) dis.unregister(this.dispatcherRef);
MatrixClientPeg.get().removeListener(RoomEvent.MyMembership, this.onMyMembership);
}