change regex for redirecting old paths to the new ones
This commit is contained in:
parent
619dd3c9fa
commit
a9e8a5c25a
|
@ -222,15 +222,13 @@ export class SearchAllComponent {
|
||||||
if(this.activeEntity == null && (!params["entity"] || params["entity"].length == 0)){
|
if(this.activeEntity == null && (!params["entity"] || params["entity"].length == 0)){
|
||||||
if (active) {
|
if (active) {
|
||||||
this.activeEntity = active;
|
this.activeEntity = active;
|
||||||
// if((typeof document !== 'undefined')){
|
if((typeof document !== 'undefined')){
|
||||||
// if (active == "result") {
|
if (active == "result") {
|
||||||
// active = "research-outcomes";
|
active = "research-outcomes";
|
||||||
// }
|
}
|
||||||
// console.log(location.search);
|
let query = location.search.replace(/(active=)([^&]*)&?/, '');
|
||||||
// let query = location.search.replace(/((active=).*&)|((active=).*)/, '');
|
this.location.go(location.pathname + '/' + active, query == '?' ? '' : query);
|
||||||
// console.log(query);
|
}
|
||||||
// this.location.go(location.pathname + '/' + active, query == '?' ? '' : query);
|
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
this.activeEntity = this.getDefaultEntityToShow();
|
this.activeEntity = this.getDefaultEntityToShow();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue