Apply strictNullChecks to src/async-components/* (#10251

* Apply strictNullChecks to src/async-components/*

* Iterate
This commit is contained in:
Michael Telatyński 2023-02-28 10:51:27 +00:00 committed by GitHub
parent 629e5cb01f
commit 8ad21e6492
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 57 additions and 43 deletions

View file

@ -49,7 +49,7 @@ interface IProps {
}
interface IState {
secureSecretStorage: boolean;
secureSecretStorage: boolean | null;
phase: Phase;
passPhrase: string;
passPhraseValid: boolean;
@ -121,7 +121,7 @@ export default class CreateKeyBackupDialog extends React.PureComponent<IProps, I
const { secureSecretStorage } = this.state;
this.setState({
phase: Phase.BackingUp,
error: null,
error: undefined,
});
let info;
try {
@ -219,7 +219,7 @@ export default class CreateKeyBackupDialog extends React.PureComponent<IProps, I
private onPassPhraseValidate = (result: IValidationResult): void => {
this.setState({
passPhraseValid: result.valid,
passPhraseValid: !!result.valid,
});
};
@ -306,7 +306,7 @@ export default class CreateKeyBackupDialog extends React.PureComponent<IProps, I
changeText = _t("Go back to set it again.");
}
let passPhraseMatch = null;
let passPhraseMatch: JSX.Element | undefined;
if (matchText) {
passPhraseMatch = (
<div className="mx_CreateKeyBackupDialog_passPhraseMatch">