1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Merge pull request #1600 from SimonBrandner/handle-undefined-peerconn

Handle undefined peerconn
This commit is contained in:
David Baker
2021-02-09 16:29:46 +00:00
committed by GitHub

View File

@@ -521,6 +521,10 @@ export class MatrixCall extends EventEmitter {
} }
private async collectCallStats(): Promise<any[]> { private async collectCallStats(): Promise<any[]> {
// This happens when the call fails before it starts.
// For example when we fail to get capture sources
if (!this.peerConn) return;
const statsReport = await this.peerConn.getStats(); const statsReport = await this.peerConn.getStats();
const stats = []; const stats = [];
for (const item of statsReport) { for (const item of statsReport) {