Use MatrixClientPeg::safeGet for strict typing (#10989)
This commit is contained in:
parent
d64018ce26
commit
9b5b053148
60 changed files with 225 additions and 203 deletions
|
@ -165,7 +165,7 @@ function getDeviceContext(client: MatrixClient): DeviceContext {
|
|||
}
|
||||
|
||||
async function getContexts(): Promise<Contexts> {
|
||||
const client = MatrixClientPeg.get();
|
||||
const client = MatrixClientPeg.safeGet();
|
||||
return {
|
||||
user: getUserContext(client),
|
||||
crypto: await getCryptoContext(client),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue