From 874a1926cea2834a5a51b8d527c32e7199151610 Mon Sep 17 00:00:00 2001 From: Hsuan Lee Date: Fri, 11 Oct 2019 10:42:10 +0800 Subject: [PATCH] perf(module:typography, tabs): make the `destroy$` complete when destroy --- components/tabs/nz-tabset.component.ts | 2 ++ components/typography/nz-text-copy.component.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/components/tabs/nz-tabset.component.ts b/components/tabs/nz-tabset.component.ts index 6322f1ef83a..419b216d353 100644 --- a/components/tabs/nz-tabset.component.ts +++ b/components/tabs/nz-tabset.component.ts @@ -308,6 +308,8 @@ export class NzTabSetComponent ngOnDestroy(): void { this.tabsSubscription.unsubscribe(); this.tabLabelSubscription.unsubscribe(); + this.destroy$.next(); + this.destroy$.complete(); } ngAfterViewInit(): void { diff --git a/components/typography/nz-text-copy.component.ts b/components/typography/nz-text-copy.component.ts index 50beee780c8..988c106e1eb 100644 --- a/components/typography/nz-text-copy.component.ts +++ b/components/typography/nz-text-copy.component.ts @@ -59,6 +59,8 @@ export class NzTextCopyComponent implements OnInit, OnDestroy { ngOnDestroy(): void { clearTimeout(this.copyId); + this.destroy$.next(); + this.destroy$.complete(); } onClick(): void {