Conform more of the codebase to strictNullChecks (#10505
* Conform more of the codebase to `strictNullChecks` * Iterate * Conform more of the codebase to `strictNullChecks` * Iterate * Iterate * Iterate * Iterate
This commit is contained in:
parent
7503bf6b96
commit
e5a314617a
21 changed files with 76 additions and 83 deletions
|
@ -439,9 +439,11 @@ export default class Notifications extends React.PureComponent<IProps, IState> {
|
|||
append: true,
|
||||
});
|
||||
} else {
|
||||
const pusher = this.state.pushers.find((p) => p.kind === "email" && p.pushkey === email);
|
||||
pusher.kind = null; // flag for delete
|
||||
await MatrixClientPeg.get().setPusher(pusher);
|
||||
const pusher = this.state.pushers?.find((p) => p.kind === "email" && p.pushkey === email);
|
||||
if (pusher) {
|
||||
pusher.kind = null; // flag for delete
|
||||
await MatrixClientPeg.get().setPusher(pusher);
|
||||
}
|
||||
}
|
||||
|
||||
await this.refreshFromServer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue