From 4d0b7690ce1d0500ab84cad4ae2d14875d190b17 Mon Sep 17 00:00:00 2001 From: richard-loafle <44828666+richard-loafle@users.noreply.github.com> Date: Fri, 3 Apr 2020 16:57:31 +0900 Subject: [PATCH] bug fixed --- src/app/pages/account/components/login.page.component.ts | 4 +--- src/app/services/app.service.ts | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/pages/account/components/login.page.component.ts b/src/app/pages/account/components/login.page.component.ts index 2180fa6..db2eb15 100644 --- a/src/app/pages/account/components/login.page.component.ts +++ b/src/app/pages/account/components/login.page.component.ts @@ -32,7 +32,5 @@ export class LoginPageComponent implements OnInit, OnDestroy { ); } - ngOnDestroy(): void { - throw new Error('Method not implemented.'); - } + ngOnDestroy(): void {} } diff --git a/src/app/services/app.service.ts b/src/app/services/app.service.ts index 16c0abd..14e4440 100644 --- a/src/app/services/app.service.ts +++ b/src/app/services/app.service.ts @@ -31,6 +31,12 @@ export class AppService { initialize(): Promise { const initSession = new Promise(async (resolve, reject) => { try { + let loginSession = this.sessionStorageService.get( + AppKey.LoginSession + ); + + loginSession = loginSession || {}; + let deviceType: DeviceType; let desktopType: DesktopType; @@ -60,6 +66,7 @@ export class AppService { } this.sessionStorageService.set(AppKey.LoginSession, { + ...loginSession, deviceType, desktopType, companyGroupCode: this.companyGroupCode