Don't date if no there aren't peak viewers

This commit is contained in:
Chocobozzz 2022-04-20 09:17:23 +02:00
parent ffcfb32b2f
commit 4f9a20a00a
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 1 deletions

View File

@ -154,7 +154,9 @@ export class VideoStatsComponent implements OnInit {
{ {
label: $localize`Peak viewers`, label: $localize`Peak viewers`,
value: this.numberFormatter.transform(overallStats.viewersPeak), 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
} }
] ]
} }