]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Don't date if no there aren't peak viewers
authorChocobozzz <me@florianbigard.com>
Wed, 20 Apr 2022 07:17:23 +0000 (09:17 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 20 Apr 2022 07:17:23 +0000 (09:17 +0200)
client/src/app/+stats/video/video-stats.component.ts

index 8200661c31a3a202f73290ea7529e34cd453683b..09ed3779993320b2b8e903d479fdb5a29bf770ed 100644 (file)
@@ -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
       }
     ]
   }