First version with PostgreSQL
[oweals/peertube.git] / client / src / app / admin / requests / request-stats / request-stats.component.ts
index 4b0844574fd1b238ead2320e65375fab6d794b54..9e2af219c891e7980bd8ac0619e8b032a9d205d6 100644 (file)
@@ -19,7 +19,7 @@ export class RequestStatsComponent implements OnInit, OnDestroy {
   }
 
   ngOnDestroy() {
-    if (this.stats.secondsInterval !== null) {
+    if (this.stats !== null && this.stats.secondsInterval !== null) {
       clearInterval(this.interval);
     }
   }
@@ -27,7 +27,6 @@ export class RequestStatsComponent implements OnInit, OnDestroy {
   getStats() {
     this.requestService.getStats().subscribe(
       stats => {
-        console.log(stats);
         this.stats = stats;
         this.runInterval();
       },