mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
fix issue where facets would be empty if you went straight to a search url in prod mode
This commit is contained in:
@@ -264,13 +264,21 @@ export class SearchService implements OnDestroy {
|
||||
return this.rdb.buildFromHref(href$).pipe(
|
||||
map((rd: RemoteData<FacetConfigResponse>) => {
|
||||
if (rd.hasSucceeded) {
|
||||
let filters: SearchFilterConfig[];
|
||||
if (isNotEmpty(rd.payload.filters)) {
|
||||
filters = rd.payload.filters
|
||||
.map((filter: any) => Object.assign(new SearchFilterConfig(), filter));
|
||||
} else {
|
||||
filters = [];
|
||||
}
|
||||
|
||||
return new RemoteData(
|
||||
rd.timeCompleted,
|
||||
rd.msToLive,
|
||||
rd.lastUpdated,
|
||||
rd.state,
|
||||
rd.errorMessage,
|
||||
rd.payload.filters,
|
||||
filters,
|
||||
rd.statusCode,
|
||||
);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user