From 37229de26e0979733d197b10811db17fab31abcc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 16 Aug 2022 14:48:11 +0200 Subject: Fix "undefined" resolution in player stats --- client/src/assets/player/shared/stats/stats-card.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'client/src/assets/player/shared') diff --git a/client/src/assets/player/shared/stats/stats-card.ts b/client/src/assets/player/shared/stats/stats-card.ts index 1199d3285..830670271 100644 --- a/client/src/assets/player/shared/stats/stats-card.ts +++ b/client/src/assets/player/shared/stats/stats-card.ts @@ -145,7 +145,10 @@ class StatsCard extends Component { ? `${level?.videoCodec || ''} / ${level?.audioCodec || ''}` : undefined - const resolution = `${level?.height}p${level?.attrs['FRAME-RATE'] || ''}` + const resolution = level?.height + ? `${level?.height}p${level?.attrs['FRAME-RATE'] || ''}` + : undefined + const buffer = this.timeRangesToString(this.player().buffered()) let progress: number -- cgit v1.2.3