Use take instead unsubscribing the observable

This commit is contained in:
Sergio Fernández Celorio
2025-04-10 17:27:26 +02:00
parent 6075317c88
commit c90008e3c2

View File

@@ -18,6 +18,7 @@ import {
import {
filter,
map,
take,
} from 'rxjs/operators';
import {
@@ -201,7 +202,7 @@ export class SearchFiltersComponent implements OnInit {
}
return result;
}),
).subscribe().unsubscribe(); // Execute the pipeline and immediately unsubscribe
).pipe(take(1)).subscribe(); // Execute the pipeline once and complete
}
}