Skip to content

Commit fd6d470

Browse files
111731: Fixed scope not correctly resetting to no scope when clicking on "Search all of DSpace" in the search scope selector
1 parent ede5f43 commit fd6d470

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/app/shared/search/search.component.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ describe('SearchComponent', () => {
294294

295295
const expectedSearchOptions = Object.assign(paginatedSearchOptions$.value, {
296296
configuration: 'default',
297+
scope: '',
297298
sort: sortOptionsList[0],
298299
});
299300
expect(comp.currentConfiguration$).toBeObservable(cold('b', {

src/app/shared/search/search.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ export class SearchComponent implements OnDestroy, OnInit {
356356
}
357357

358358
this.currentScope$ = this.routeService.getQueryParameterValue('scope').pipe(
359-
map((routeValue: string) => hasValue(routeValue) ? routeValue : this.scope),
359+
map((routeValue: string) => hasValue(routeValue) ? routeValue : this.scope ?? ''),
360360
);
361361

362362
this.isSidebarCollapsed$ = this.isSidebarCollapsed();

0 commit comments

Comments
 (0)