diff --git a/src/app/pages/inactivity/inactivity.page.ts b/src/app/pages/inactivity/inactivity.page.ts index bcccf0249..0132a6033 100644 --- a/src/app/pages/inactivity/inactivity.page.ts +++ b/src/app/pages/inactivity/inactivity.page.ts @@ -77,8 +77,8 @@ export class InactivityPage implements OnInit { // if current attemp is equal to the current user if (attempt.UserId == SessionStore.user.UserId) { await this.authService.SetSession(attempt, this.userattempt); - await this.authService.loginChat(this.userattempt); - await this.getToken(); + this.authService.loginChat(this.userattempt); + this.getToken(); SessionStore.setInativity(true) this.goback() @@ -143,7 +143,12 @@ export class InactivityPage implements OnInit { goback() { const pathName = this.SessionStore.user.UrlBeforeInactivity - this.router.navigate([pathName]); + if(pathName) { + this.router.navigate([pathName]); + } else { + this.router.navigate(['/home/events']); + } + } storePin() {