Skip to content

Commit 782305d

Browse files
committed
fix(cdk/tree): remove leaking subscription
Fixes that we weren't unsubscribing from one observable in the tree. Fixes #31454.
1 parent b5fbf52 commit 782305d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cdk/tree/tree.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,6 +1400,7 @@ export class CdkTreeNode<T, K = T> implements OnDestroy, OnInit, TreeKeyManagerI
14001400
.changed.pipe(
14011401
map(() => this.isExpanded),
14021402
distinctUntilChanged(),
1403+
takeUntil(this._destroyed),
14031404
)
14041405
.subscribe(() => this._changeDetectorRef.markForCheck());
14051406
this._tree._setNodeTypeIfUnset(this._type);

0 commit comments

Comments
 (0)