Conform more code to strictNullChecks (#10368

* Conform more code to `strictNullChecks`

* Iterate
This commit is contained in:
Michael Telatynski 2023-03-14 11:09:35 +00:00 committed by GitHub
parent 05e3fb09d6
commit 8cb8cd4eb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 176 additions and 157 deletions

View file

@ -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>