Remove duplicated ChangeDetectorRef in blockchains blocks component

This commit is contained in:
nymkappa 2022-02-18 22:25:31 +09:00
parent c0dd355d57
commit 63e81d51d8
2 changed files with 5 additions and 6 deletions

View File

@ -47,13 +47,12 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
public stateService: StateService,
private cd: ChangeDetectorRef,
private location: Location,
private cdr: ChangeDetectorRef
) {
}
enabledMiningInfoIfNeeded(url) {
this.showMiningInfo = url === '/mining';
this.cdr.detectChanges(); // Need to update the view asap
this.cd.markForCheck(); // Need to update the view asap
}
ngOnInit() {