diff --git a/login/user.component.ts b/login/user.component.ts index 4dbc5a73..183b9880 100644 --- a/login/user.component.ts +++ b/login/user.component.ts @@ -65,7 +65,9 @@ export class UserComponent { ngOnDestroy() { - this.sub.unsubscribe(); + if(this.sub) { + this.sub.unsubscribe(); + } if (this.sublogin) { this.sublogin.unsubscribe(); } diff --git a/login/utils/helper.class.ts b/login/utils/helper.class.ts index 3e6fd660..be682889 100644 --- a/login/utils/helper.class.ts +++ b/login/utils/helper.class.ts @@ -14,9 +14,9 @@ export class User { export class Session{ public static removeUser() { - COOKIE.deleteCookie(COOKIE.cookieName_id) + COOKIE.deleteCookie(COOKIE.cookieName_id); COOKIE.deleteCookie("openAIRESession"); - + COOKIE.deleteCookie("openAIREUser"); } public static isLoggedIn(): boolean {