mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-25 19:23:40 +00:00
Apply strictNullChecks around the codebase (#10302
* Apply `strictNullChecks` around the codebase * Iterate PR
This commit is contained in:
committed by
GitHub
parent
7c2bb966d0
commit
4b8bada24b
+4
-4
@@ -89,7 +89,7 @@ async function getStorageContext(): Promise<StorageContext> {
|
||||
if (estimate.usageDetails) {
|
||||
const usageDetails: string[] = [];
|
||||
Object.keys(estimate.usageDetails).forEach((k) => {
|
||||
usageDetails.push(`${k}: ${String(estimate.usageDetails[k])}`);
|
||||
usageDetails.push(`${k}: ${String(estimate.usageDetails![k])}`);
|
||||
});
|
||||
result[`storageManager_usage`] = usageDetails.join(", ");
|
||||
}
|
||||
@@ -137,9 +137,9 @@ async function getCryptoContext(client: MatrixClient): Promise<CryptoContext> {
|
||||
),
|
||||
cross_signing_key: crossSigning.getId()!,
|
||||
cross_signing_privkey_in_secret_storage: String(!!(await crossSigning.isStoredInSecretStorage(secretStorage))),
|
||||
cross_signing_master_privkey_cached: String(!!(pkCache && (await pkCache.getCrossSigningKeyCache("master")))),
|
||||
cross_signing_master_privkey_cached: String(!!(pkCache && (await pkCache.getCrossSigningKeyCache?.("master")))),
|
||||
cross_signing_user_signing_privkey_cached: String(
|
||||
!!(pkCache && (await pkCache.getCrossSigningKeyCache("user_signing"))),
|
||||
!!(pkCache && (await pkCache.getCrossSigningKeyCache?.("user_signing"))),
|
||||
),
|
||||
secret_storage_ready: String(await client.isSecretStorageReady()),
|
||||
secret_storage_key_in_account: String(!!(await secretStorage.hasKey())),
|
||||
@@ -151,7 +151,7 @@ async function getCryptoContext(client: MatrixClient): Promise<CryptoContext> {
|
||||
|
||||
function getDeviceContext(client: MatrixClient): DeviceContext {
|
||||
const result: DeviceContext = {
|
||||
device_id: client?.deviceId,
|
||||
device_id: client?.deviceId ?? undefined,
|
||||
mx_local_settings: localStorage.getItem("mx_local_settings"),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user