[Library]: searchAll.component.ts: [Bug fix] Added check for client side when accessing "active" parameter via location.

This commit is contained in:
Konstantina Galouni 2022-10-19 11:13:08 +03:00
parent ec8fb39eea
commit 65cc8504ea
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ export class SearchAllComponent {
this.activeEntity = ((["result","projects","organizations","datasources","services"]).indexOf(params["active"])!= -1)?params["active"]:this.getDefaultEntityToShow();
}else if (this.activeEntity !=null && (!params["active"] || params["active"].length ==0)){
this.parameters["active"]=this.activeEntity;
if(location.search && location.search.indexOf("active=") == -1){
if((typeof document !== 'undefined') && location.search && location.search.indexOf("active=") == -1){
this.location.go(location.pathname, ((location.search)?(location.search+"&"):("?")) +"active=" + this.activeEntity);
}
}