* Improve typescript null checking in places * Iterate * Fix Timer.ts
This commit is contained in:
parent
97506cbcdb
commit
9743852380
43 changed files with 155 additions and 154 deletions
|
@ -648,7 +648,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
onFinished: (confirm) => {
|
||||
if (confirm) {
|
||||
// FIXME: controller shouldn't be loading a view :(
|
||||
const modal = Modal.createDialog(Spinner, null, "mx_Dialog_spinner");
|
||||
const modal = Modal.createDialog(Spinner, undefined, "mx_Dialog_spinner");
|
||||
|
||||
MatrixClientPeg.get()
|
||||
.leave(payload.room_id)
|
||||
|
|
|
@ -72,7 +72,7 @@ export default class MKeyVerificationConclusion extends React.Component<IProps>
|
|||
this.forceUpdate();
|
||||
};
|
||||
|
||||
public static shouldRender(mxEvent: MatrixEvent, request: VerificationRequest): boolean {
|
||||
public static shouldRender(mxEvent: MatrixEvent, request?: VerificationRequest): boolean {
|
||||
// normally should not happen
|
||||
if (!request) {
|
||||
return false;
|
||||
|
@ -99,9 +99,9 @@ export default class MKeyVerificationConclusion extends React.Component<IProps>
|
|||
return true;
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public render(): JSX.Element | null {
|
||||
const { mxEvent } = this.props;
|
||||
const request = mxEvent.verificationRequest;
|
||||
const request = mxEvent.verificationRequest!;
|
||||
|
||||
if (!MKeyVerificationConclusion.shouldRender(mxEvent, request)) {
|
||||
return null;
|
||||
|
@ -110,7 +110,7 @@ export default class MKeyVerificationConclusion extends React.Component<IProps>
|
|||
const client = MatrixClientPeg.get();
|
||||
const myUserId = client.getUserId();
|
||||
|
||||
let title;
|
||||
let title: string | undefined;
|
||||
|
||||
if (request.done) {
|
||||
title = _t("You verified %(name)s", {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue