You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Handle undefined peerconn
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user