From 4f9a20a00a37c51788ab1cf4b343247918090f9b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 20 Apr 2022 09:17:23 +0200 Subject: Don't date if no there aren't peak viewers --- client/src/app/+stats/video/video-stats.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client/src/app/+stats/video/video-stats.component.ts') diff --git a/client/src/app/+stats/video/video-stats.component.ts b/client/src/app/+stats/video/video-stats.component.ts index 8200661c3..09ed37799 100644 --- a/client/src/app/+stats/video/video-stats.component.ts +++ b/client/src/app/+stats/video/video-stats.component.ts @@ -154,7 +154,9 @@ export class VideoStatsComponent implements OnInit { { label: $localize`Peak viewers`, value: this.numberFormatter.transform(overallStats.viewersPeak), - moreInfo: $localize`at ${new Date(overallStats.viewersPeakDate).toLocaleString()}` + moreInfo: overallStats.viewersPeak !== 0 + ? $localize`at ${new Date(overallStats.viewersPeakDate).toLocaleString()}` + : undefined } ] } -- cgit v1.2.3