Apply strictNullChecks to src/async-components/* (#10251
* Apply strictNullChecks to src/async-components/* * Iterate
This commit is contained in:
parent
629e5cb01f
commit
8ad21e6492
7 changed files with 57 additions and 43 deletions
|
@ -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">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue