diff --git a/src/app/shared/search/search-sidebar/search-sidebar.component.html b/src/app/shared/search/search-sidebar/search-sidebar.component.html
index e17fe941bab..e467aa02136 100644
--- a/src/app/shared/search/search-sidebar/search-sidebar.component.html
+++ b/src/app/shared/search/search-sidebar/search-sidebar.component.html
@@ -15,6 +15,7 @@
this.currentScope = currentScope);
this.searchConfigService.getCurrentConfiguration(this.defaultConfiguration)
@@ -81,9 +86,13 @@ export class SearchSwitchConfigurationComponent implements OnDestroy, OnInit {
const navigationExtras: NavigationExtras = {
queryParams: {
configuration: this.selectedOption.value,
- scope: this.currentScope
},
};
+ if (this.currentScope) {
+ navigationExtras.queryParams = Object.assign(navigationExtras.queryParams, {
+ scope: this.currentScope
+ });
+ }
this.changeConfiguration.emit(this.selectedOption);
this.router.navigate(this.getSearchLinkParts(), navigationExtras);