Conform more code to strictNullChecks
(#10368
* Conform more code to `strictNullChecks` * Iterate
This commit is contained in:
parent
05e3fb09d6
commit
8cb8cd4eb1
24 changed files with 176 additions and 157 deletions
|
@ -43,12 +43,12 @@ interface IProps {
|
|||
interface IState {
|
||||
sendLogs: boolean;
|
||||
busy: boolean;
|
||||
err: string;
|
||||
err: string | null;
|
||||
issueUrl: string;
|
||||
text: string;
|
||||
progress: string;
|
||||
progress: string | null;
|
||||
downloadBusy: boolean;
|
||||
downloadProgress: string;
|
||||
downloadProgress: string | null;
|
||||
}
|
||||
|
||||
export default class BugReportDialog extends React.Component<IProps, IState> {
|
||||
|
@ -181,12 +181,12 @@ export default class BugReportDialog extends React.Component<IProps, IState> {
|
|||
};
|
||||
|
||||
public render(): React.ReactNode {
|
||||
let error = null;
|
||||
let error: JSX.Element | undefined;
|
||||
if (this.state.err) {
|
||||
error = <div className="error">{this.state.err}</div>;
|
||||
}
|
||||
|
||||
let progress = null;
|
||||
let progress: JSX.Element | undefined;
|
||||
if (this.state.busy) {
|
||||
progress = (
|
||||
<div className="progress">
|
||||
|
@ -196,7 +196,7 @@ export default class BugReportDialog extends React.Component<IProps, IState> {
|
|||
);
|
||||
}
|
||||
|
||||
let warning;
|
||||
let warning: JSX.Element | undefined;
|
||||
if (window.Modernizr && Object.values(window.Modernizr).some((support) => support === false)) {
|
||||
warning = (
|
||||
<p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue