Make more code conform to strict null checks (#10219

* Make more code conform to strict null checks

* Fix types

* Fix tests

* Fix remaining test assertions

* Iterate PR
This commit is contained in:
Michael Telatynski 2023-02-24 15:28:40 +00:00 committed by GitHub
parent 4c79ecf141
commit 76b82b4b2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
130 changed files with 603 additions and 603 deletions

View file

@ -36,7 +36,7 @@ interface IProps {
interface IState {
shouldLoadBackupStatus: boolean;
loading: boolean;
backupInfo: IKeyBackupInfo;
backupInfo: IKeyBackupInfo | null;
error?: string;
}
@ -55,7 +55,6 @@ export default class LogoutDialog extends React.Component<IProps, IState> {
shouldLoadBackupStatus: shouldLoadBackupStatus,
loading: shouldLoadBackupStatus,
backupInfo: null,
error: null,
};
if (shouldLoadBackupStatus) {
@ -103,14 +102,20 @@ export default class LogoutDialog extends React.Component<IProps, IState> {
// A key backup exists for this account, but the creating device is not
// verified, so restore the backup which will give us the keys from it and
// allow us to trust it (ie. upload keys to it)
Modal.createDialog(RestoreKeyBackupDialog, null, null, /* priority = */ false, /* static = */ true);
Modal.createDialog(
RestoreKeyBackupDialog,
undefined,
undefined,
/* priority = */ false,
/* static = */ true,
);
} else {
Modal.createDialogAsync(
import("../../../async-components/views/dialogs/security/CreateKeyBackupDialog") as unknown as Promise<
ComponentType<{}>
>,
null,
null,
undefined,
undefined,
/* priority = */ false,
/* static = */ true,
);