fix coredump home page (#3624)

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2024-08-22 17:18:29 -07:00
committed by GitHub
parent 713a30ed72
commit 22a9f44916
2 changed files with 30 additions and 15 deletions

View File

@ -109,11 +109,13 @@ export class CoreDumpManager {
getWebrtcStats(): Promise<string> {
if (!this.engineCommandManager.engineConnection) {
throw new Error('Engine connection not initialized')
// when the engine connection is not available, return an empty object.
return Promise.resolve(JSON.stringify({}))
}
if (!this.engineCommandManager.engineConnection.webrtcStatsCollector) {
throw new Error('Engine webrtcStatsCollector not initialized')
// when the engine connection is not available, return an empty object.
return Promise.resolve(JSON.stringify({}))
}
return this.engineCommandManager.engineConnection