Skip to content

Commit 2a93d05

Browse files
authored
fix(module:cdk): resolve leak (#7139)
1 parent 6835544 commit 2a93d05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/cdk/overflow/overflow-container.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ export class NzOverflowContainerComponent implements OnInit, AfterContentInit, O
152152
}
153153
ngAfterContentInit(): void {
154154
this.overflowItems?.changes.pipe(startWith(this.overflowItems)).subscribe(this.overflowItems$);
155-
this.overflowSuffix?.suffixWidth$.subscribe(this.suffixWidth$);
156-
this.overflowRest?.restWidth$.subscribe(this.restWidth$);
155+
this.overflowSuffix?.suffixWidth$.pipe(takeUntil(this.destroy$)).subscribe(this.suffixWidth$);
156+
this.overflowRest?.restWidth$.pipe(takeUntil(this.destroy$)).subscribe(this.restWidth$);
157157
this.contentInit$.next();
158158
}
159159
ngOnDestroy(): void {

0 commit comments

Comments
 (0)