Skip to content

Commit 378f945

Browse files
FrancescoMolinarovins01-4science
authored andcommitted
Merged in task/dspace-cris-2023_02_x/DSC-2441 (pull request DSpace#3394)
[DSC-2441] fix scope update Approved-by: Andrea Barbasso
2 parents 3f8f702 + f8a4965 commit 378f945

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ describe('SearchComponent', () => {
285285
const expectedSearchOptions = Object.assign(paginatedSearchOptions$.value, {
286286
configuration: 'default',
287287
sort: sortOptionsList[0],
288-
forcedEmbeddedKeys: ['metrics']
288+
forcedEmbeddedKeys: ['metrics'],
289+
scope: ''
289290
});
290291
expect(comp.currentConfiguration$).toBeObservable(cold('b', {
291292
b: 'default'

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

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

455455
this.currentScope$ = this.routeService.getQueryParameterValue('scope').pipe(
456-
map((routeValue: string) => hasValue(routeValue) ? routeValue : this.scope),
456+
map((routeValue: string) => hasValue(routeValue) ? routeValue : this.scope ?? ''),
457457
);
458458

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

0 commit comments

Comments
 (0)