Conform more code to strict null checking (#10153)
* Conform more code to strict null checking * Conform more code to strict null checking * Iterate * Iterate
This commit is contained in:
parent
a4ff959aa1
commit
145a5a8a8d
89 changed files with 520 additions and 551 deletions
|
@ -81,8 +81,8 @@ async function collectBugReport(opts: IOpts = {}, gzipLogs = true): Promise<Form
|
|||
}
|
||||
|
||||
if (client) {
|
||||
body.append("user_id", client.credentials.userId);
|
||||
body.append("device_id", client.deviceId);
|
||||
body.append("user_id", client.credentials.userId!);
|
||||
body.append("device_id", client.deviceId!);
|
||||
|
||||
// TODO: make this work with rust crypto
|
||||
if (client.isCryptoEnabled() && client.crypto) {
|
||||
|
@ -181,7 +181,7 @@ async function collectBugReport(opts: IOpts = {}, gzipLogs = true): Promise<Form
|
|||
}
|
||||
}
|
||||
|
||||
body.append("mx_local_settings", localStorage.getItem("mx_local_settings"));
|
||||
body.append("mx_local_settings", localStorage.getItem("mx_local_settings")!);
|
||||
|
||||
if (opts.sendLogs) {
|
||||
progressCallback(_t("Collecting logs"));
|
||||
|
@ -293,9 +293,9 @@ export async function submitFeedback(
|
|||
canContact = false,
|
||||
extraData: Record<string, string> = {},
|
||||
): Promise<void> {
|
||||
let version = "UNKNOWN";
|
||||
let version: string | undefined;
|
||||
try {
|
||||
version = await PlatformPeg.get().getAppVersion();
|
||||
version = await PlatformPeg.get()?.getAppVersion();
|
||||
} catch (err) {} // PlatformPeg already logs this.
|
||||
|
||||
const body = new FormData();
|
||||
|
@ -304,7 +304,7 @@ export async function submitFeedback(
|
|||
body.append("can_contact", canContact ? "yes" : "no");
|
||||
|
||||
body.append("app", "element-web");
|
||||
body.append("version", version);
|
||||
body.append("version", version || "UNKNOWN");
|
||||
body.append("platform", PlatformPeg.get().getHumanReadableName());
|
||||
body.append("user_id", MatrixClientPeg.get()?.getUserId());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue