From 1318c4aa369d9517a4bc2cc30032f5e2d3dd096d Mon Sep 17 00:00:00 2001 From: nymkappa Date: Mon, 7 Mar 2022 18:42:47 +0100 Subject: [PATCH] Fix broken navigation when clicking on pie chart --- .../app/components/pool-ranking/pool-ranking.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts index 64641c31d..01b36ab74 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Input, NgZone, OnInit } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { Router } from '@angular/router'; import { EChartsOption, PieSeriesOption } from 'echarts'; @@ -41,6 +41,7 @@ export class PoolRankingComponent implements OnInit { private miningService: MiningService, private seoService: SeoService, private router: Router, + private zone: NgZone, ) { } @@ -293,7 +294,9 @@ export class PoolRankingComponent implements OnInit { if (e.data.data === 9999) { // "Other" return; } - this.router.navigate(['/mining/pool/', e.data.data]); + this.zone.run(() => { + this.router.navigate(['/mining/pool/', e.data.data]); + }); }); }