From ad98706db4cee4a7a7aa42e0dc00a002e2e2423c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 15 Feb 2023 13:38:41 +0000 Subject: [PATCH] Iterate types (#3156) --- src/client.ts | 4 ++-- src/crypto/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client.ts b/src/client.ts index 7b8514034..5ea515fe9 100644 --- a/src/client.ts +++ b/src/client.ts @@ -4131,12 +4131,12 @@ export class MatrixClient extends TypedEventEmitter { let content = { users: {} as Record, }; - if (event.getType() === EventType.RoomPowerLevels) { + if (event?.getType() === EventType.RoomPowerLevels) { // take a copy of the content to ensure we don't corrupt // existing client state with a failed power level change content = utils.deepCopy(event.getContent()); diff --git a/src/crypto/index.ts b/src/crypto/index.ts index 4387dcd06..550087222 100644 --- a/src/crypto/index.ts +++ b/src/crypto/index.ts @@ -151,7 +151,7 @@ export interface ICryptoCallbacks { requestId: string, secretName: string, deviceTrust: DeviceTrustLevel, - ) => Promise; + ) => Promise; getDehydrationKey?: (keyInfo: ISecretStorageKeyInfo, checkFunc: (key: Uint8Array) => void) => Promise; getBackupKey?: () => Promise; }