Conform more of the codebase to strictNullChecks
(#10731)
This commit is contained in:
parent
9f8113eabd
commit
1281c0746b
40 changed files with 147 additions and 119 deletions
|
@ -48,14 +48,11 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
|
|||
Modal.createDialog(BugReportDialog, {});
|
||||
};
|
||||
|
||||
const rageshakeUrl = SdkConfig.get().bug_report_endpoint_url;
|
||||
const hasFeedback = !!rageshakeUrl;
|
||||
const hasFeedback = !!SdkConfig.get().bug_report_endpoint_url;
|
||||
const onFinished = (sendFeedback: boolean): void => {
|
||||
if (hasFeedback && sendFeedback) {
|
||||
if (rageshakeUrl) {
|
||||
const label = props.feature ? `${props.feature}-feedback` : "feedback";
|
||||
submitFeedback(rageshakeUrl, label, comment, canContact);
|
||||
}
|
||||
const label = props.feature ? `${props.feature}-feedback` : "feedback";
|
||||
submitFeedback(label, comment, canContact);
|
||||
|
||||
Modal.createDialog(InfoDialog, {
|
||||
title: _t("Feedback sent"),
|
||||
|
@ -65,8 +62,8 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
|
|||
props.onFinished();
|
||||
};
|
||||
|
||||
let feedbackSection;
|
||||
if (rageshakeUrl) {
|
||||
let feedbackSection: JSX.Element | undefined;
|
||||
if (hasFeedback) {
|
||||
feedbackSection = (
|
||||
<div className="mx_FeedbackDialog_section mx_FeedbackDialog_rateApp">
|
||||
<h3>{_t("Comment")}</h3>
|
||||
|
@ -93,8 +90,8 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
|
|||
);
|
||||
}
|
||||
|
||||
let bugReports: JSX.Element | null = null;
|
||||
if (rageshakeUrl) {
|
||||
let bugReports: JSX.Element | undefined;
|
||||
if (hasFeedback) {
|
||||
bugReports = (
|
||||
<p className="mx_FeedbackDialog_section_microcopy">
|
||||
{_t(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue