From 0e2b2e351d65486ca35d1e602b195232bc80a001 Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Fri, 26 Jan 2024 10:00:16 +0300 Subject: [PATCH] fix(cdk): when the consumer unsubscribes, clean up data ready for next subscription (#6554) --- projects/cdk/observables/control-value.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/cdk/observables/control-value.ts b/projects/cdk/observables/control-value.ts index e80dd67d20d3..7878f308bcb7 100644 --- a/projects/cdk/observables/control-value.ts +++ b/projects/cdk/observables/control-value.ts @@ -13,6 +13,6 @@ export function tuiControlValue( throw new TuiValueChangesException(); } - control.valueChanges.pipe(startWith(control.value)).subscribe(subscriber); + return control.valueChanges.pipe(startWith(control.value)).subscribe(subscriber); }); }