Skip to content

Commit c1e39e7

Browse files
for-kiantongben
andauthored
perf(module:back-top): remove the redundant changeDetectorRef
Co-authored-by: tongben <ben.tong@fastobetech.com>
1 parent 5dea059 commit c1e39e7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎components/back-top/back-top.component.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ export class NzBackTopComponent implements OnInit, OnDestroy, OnChanges {
106106
public nzConfigService: NzConfigService,
107107
private scrollSrv: NzScrollService,
108108
private platform: Platform,
109-
private cd: ChangeDetectorRef,
110109
private zone: NgZone,
111110
private cdr: ChangeDetectorRef,
112111
private destroy$: NzDestroyService,
@@ -135,7 +134,7 @@ export class NzBackTopComponent implements OnInit, OnDestroy, OnChanges {
135134
return;
136135
}
137136
this.visible = !this.visible;
138-
this.cd.detectChanges();
137+
this.cdr.detectChanges();
139138
}
140139

141140
private registerScrollEvent(): void {

0 commit comments

Comments
 (0)