[Library|Trunk]
UserMini components: add checks before unsubscribe and use location git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@56940 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
6e415283cc
commit
6d49be8553
|
@ -99,11 +99,13 @@ export class UserMiniComponent {
|
|||
|
||||
}
|
||||
ngOnDestroy(){
|
||||
this.sub.unsubscribe();
|
||||
if(this.sub) {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
initialize(){
|
||||
if(!this.redirectUrl) {
|
||||
if(!this.redirectUrl && location) {
|
||||
this.redirectUrl = location.pathname;
|
||||
}
|
||||
if(Session.isLoggedIn()){
|
||||
|
|
Loading…
Reference in New Issue