From b909c8ddc8fc39bc7061886acbfec45f5475fef6 Mon Sep 17 00:00:00 2001 From: fabian-rehm Date: Fri, 24 Oct 2025 09:22:15 +0200 Subject: [PATCH] Update PeerConnectionController.ts Fix for throwing error when peerConnection is not defined --- .../src/PeerConnectionController/PeerConnectionController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Frontend/library/src/PeerConnectionController/PeerConnectionController.ts b/Frontend/library/src/PeerConnectionController/PeerConnectionController.ts index 5df2b3ca..e673ac9b 100644 --- a/Frontend/library/src/PeerConnectionController/PeerConnectionController.ts +++ b/Frontend/library/src/PeerConnectionController/PeerConnectionController.ts @@ -171,7 +171,7 @@ export class PeerConnectionController { * Generate Aggregated Stats and then fire a onVideo Stats event */ generateStats() { - this.peerConnection.getStats().then((statsData: RTCStatsReport) => { + this.peerConnection?.getStats().then((statsData: RTCStatsReport) => { this.aggregatedStats.processStats(statsData); this.onVideoStats(this.aggregatedStats);