From aa77faf3140b964f4e27e8c2996fe4bd688221a5 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Sat, 5 Feb 2022 19:06:27 +0900 Subject: [PATCH] Use switchMap param instead of re-reading this.route.snapshot.fragment --- .../src/app/components/television/television.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/television/television.component.ts b/frontend/src/app/components/television/television.component.ts index a2f1dcdd8..e219a0b51 100644 --- a/frontend/src/app/components/television/television.component.ts +++ b/frontend/src/app/components/television/television.component.ts @@ -31,8 +31,8 @@ export class TelevisionComponent implements OnInit { this.route.fragment .pipe( - switchMap(() => { - switch (this.route.snapshot.fragment) { + switchMap((fragment) => { + switch (fragment) { case '2h': return this.apiService.list2HStatistics$(); case '24h': return this.apiService.list24HStatistics$(); case '1w': return this.apiService.list1WStatistics$();