Conform more of the code base to strict null checking (#10147)
* Conform more of the code base to strict null checking * More strict fixes * More strict work * Fix missing optional type * Iterate
This commit is contained in:
parent
fa036a5080
commit
da7aa4055e
380 changed files with 682 additions and 694 deletions
|
@ -50,12 +50,12 @@ export function getCallBehaviourWellKnown(): ICallBehaviourWellKnown {
|
|||
return clientWellKnown?.[CALL_BEHAVIOUR_WK_KEY];
|
||||
}
|
||||
|
||||
export function getE2EEWellKnown(): IE2EEWellKnown {
|
||||
export function getE2EEWellKnown(): IE2EEWellKnown | null {
|
||||
const clientWellKnown = MatrixClientPeg.get().getClientWellKnown();
|
||||
if (clientWellKnown && clientWellKnown[E2EE_WK_KEY]) {
|
||||
if (clientWellKnown?.[E2EE_WK_KEY]) {
|
||||
return clientWellKnown[E2EE_WK_KEY];
|
||||
}
|
||||
if (clientWellKnown && clientWellKnown[E2EE_WK_KEY_DEPRECATED]) {
|
||||
if (clientWellKnown?.[E2EE_WK_KEY_DEPRECATED]) {
|
||||
return clientWellKnown[E2EE_WK_KEY_DEPRECATED];
|
||||
}
|
||||
return null;
|
||||
|
@ -78,8 +78,7 @@ export function embeddedPagesFromWellKnown(clientWellKnown?: IClientWellKnown):
|
|||
}
|
||||
|
||||
export function isSecureBackupRequired(): boolean {
|
||||
const wellKnown = getE2EEWellKnown();
|
||||
return wellKnown && wellKnown["secure_backup_required"] === true;
|
||||
return getE2EEWellKnown()?.["secure_backup_required"] === true;
|
||||
}
|
||||
|
||||
export enum SecureBackupSetupMethod {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue