Apply strictNullChecks to src/async-components/* (#10251
* Apply strictNullChecks to src/async-components/* * Iterate
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user