Improve types (#11239)
This commit is contained in:
parent
44615b2b04
commit
f1534fda79
12 changed files with 35 additions and 42 deletions
|
@ -130,7 +130,7 @@ export default class DeactivateAccountDialog extends React.Component<IProps, ISt
|
|||
// but given that a deactivation is followed by a local logout and all object instances being thrown away
|
||||
// this isn't done.
|
||||
MatrixClientPeg.safeGet()
|
||||
.deactivateAccount(auth, this.state.shouldErase)
|
||||
.deactivateAccount(auth ?? undefined, this.state.shouldErase)
|
||||
.then((r) => {
|
||||
// Deactivation worked - logout & close this dialog
|
||||
defaultDispatcher.fire(Action.TriggerLogout);
|
||||
|
@ -163,7 +163,7 @@ export default class DeactivateAccountDialog extends React.Component<IProps, ISt
|
|||
|
||||
private initAuth(shouldErase: boolean): void {
|
||||
MatrixClientPeg.safeGet()
|
||||
.deactivateAccount(null, shouldErase)
|
||||
.deactivateAccount(undefined, shouldErase)
|
||||
.then((r) => {
|
||||
// If we got here, oops. The server didn't require any auth.
|
||||
// Our application lifecycle will catch the error and do the logout bits.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue