Add condition if local storage backend exists use it else use enviroment property

This commit is contained in:
kostis30fyllou 2019-05-30 15:21:12 +03:00
parent 7f6911f4c6
commit b4f802fb9b
2 changed files with 5 additions and 2 deletions

View File

@ -28,8 +28,11 @@ export class Util {
}
public getBackendServerAddress(): string {
// return localStorage.getItem('mining_backend_address');
return environment.miningbackendserveraddress;
if (localStorage.getItem('mining_backend_address')) {
return localStorage.getItem('mining_backend_address');
} else {
return environment.miningbackendserveraddress;
}
}
public getIsCommunityManager(): string {