Skip to content

Commit

Permalink
perf(module:typography, tabs): make the destroy$ complete when dest…
Browse files Browse the repository at this point in the history
…roy (#4271)
  • Loading branch information
hsuanxyz authored and vthinkxie committed Oct 11, 2019
1 parent e9c5541 commit 51f4713
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/tabs/nz-tabset.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ export class NzTabSetComponent
ngOnDestroy(): void {
this.tabsSubscription.unsubscribe();
this.tabLabelSubscription.unsubscribe();
this.destroy$.next();
this.destroy$.complete();
}

ngAfterViewInit(): void {
Expand Down
2 changes: 2 additions & 0 deletions components/typography/nz-text-copy.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export class NzTextCopyComponent implements OnInit, OnDestroy {

ngOnDestroy(): void {
clearTimeout(this.copyId);
this.destroy$.next();
this.destroy$.complete();
}

onClick(): void {
Expand Down

0 comments on commit 51f4713

Please sign in to comment.