diff --git a/searchPages/find/searchAll.component.ts b/searchPages/find/searchAll.component.ts index b64cb652..5d8ec1c6 100644 --- a/searchPages/find/searchAll.component.ts +++ b/searchPages/find/searchAll.component.ts @@ -222,15 +222,13 @@ export class SearchAllComponent { if(this.activeEntity == null && (!params["entity"] || params["entity"].length == 0)){ if (active) { this.activeEntity = active; - // if((typeof document !== 'undefined')){ - // if (active == "result") { - // active = "research-outcomes"; - // } - // console.log(location.search); - // let query = location.search.replace(/((active=).*&)|((active=).*)/, ''); - // console.log(query); - // this.location.go(location.pathname + '/' + active, query == '?' ? '' : query); - // } + if((typeof document !== 'undefined')){ + if (active == "result") { + active = "research-outcomes"; + } + let query = location.search.replace(/(active=)([^&]*)&?/, ''); + this.location.go(location.pathname + '/' + active, query == '?' ? '' : query); + } } else { this.activeEntity = this.getDefaultEntityToShow(); }