diff --git a/src/e2ee/matrixKeyProvider.ts b/src/e2ee/matrixKeyProvider.ts index d84c3684c..634dbd6b1 100644 --- a/src/e2ee/matrixKeyProvider.ts +++ b/src/e2ee/matrixKeyProvider.ts @@ -41,7 +41,9 @@ export class MatrixKeyProvider extends BaseKeyProvider { encryptionKeys, ] of this.rtcSession.getEncryptionKeys()) { for (const [index, encryptionKey] of encryptionKeys.entries()) { - this.onEncryptionKeyChanged(encryptionKey, index, participant); + if (encryptionKey) { + this.onEncryptionKeyChanged(encryptionKey, index, participant); + } } } }