Conform more of the codebase to strictNullChecks
(#10518
* Conform more of the codebase to `strictNullChecks` * Iterate * Fix tests
This commit is contained in:
parent
e9cc88b872
commit
55d3548330
23 changed files with 107 additions and 99 deletions
|
@ -79,7 +79,7 @@ export default class EditHistoryMessage extends React.PureComponent<IProps, ISta
|
|||
ConfirmAndWaitRedactDialog,
|
||||
{
|
||||
redact: async () => {
|
||||
await cli.redactEvent(event.getRoomId()!, event.getId());
|
||||
await cli.redactEvent(event.getRoomId()!, event.getId()!);
|
||||
},
|
||||
},
|
||||
"mx_Dialog_confirmredact",
|
||||
|
|
|
@ -56,7 +56,7 @@ export default class ReactionsRowButton extends React.PureComponent<IProps, ISta
|
|||
public onClick = (): void => {
|
||||
const { mxEvent, myReactionEvent, content } = this.props;
|
||||
if (myReactionEvent) {
|
||||
this.context.redactEvent(mxEvent.getRoomId()!, myReactionEvent.getId());
|
||||
this.context.redactEvent(mxEvent.getRoomId()!, myReactionEvent.getId()!);
|
||||
} else {
|
||||
this.context.sendEvent(mxEvent.getRoomId()!, "m.reaction", {
|
||||
"m.relates_to": {
|
||||
|
|
|
@ -206,7 +206,7 @@ export default class PhoneNumbers extends React.Component<IProps, IState> {
|
|||
const address = this.state.verifyMsisdn;
|
||||
this.state.addTask
|
||||
?.haveMsisdnToken(token)
|
||||
.then(([finished]) => {
|
||||
.then(([finished] = []) => {
|
||||
let newPhoneNumber = this.state.newPhoneNumber;
|
||||
if (finished) {
|
||||
const msisdns = [...this.props.msisdns, { address, medium: ThreepidMedium.Phone }];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue