mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Use take instead unsubscribing the observable
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
filter,
|
filter,
|
||||||
map,
|
map,
|
||||||
|
take,
|
||||||
} from 'rxjs/operators';
|
} from 'rxjs/operators';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -201,7 +202,7 @@ export class SearchFiltersComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}),
|
}),
|
||||||
).subscribe().unsubscribe(); // Execute the pipeline and immediately unsubscribe
|
).pipe(take(1)).subscribe(); // Execute the pipeline once and complete
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user