From e4236f698c51d4fced762764341592adc6b4bf0f Mon Sep 17 00:00:00 2001 From: enadhilal Date: Sun, 29 Mar 2020 16:26:48 +0300 Subject: [PATCH] fix placeholder and lang issue --- .../authentication/login/login.component.ts | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Mohem/src/app/authentication/login/login.component.ts b/Mohem/src/app/authentication/login/login.component.ts index 27b71518..fab48459 100644 --- a/Mohem/src/app/authentication/login/login.component.ts +++ b/Mohem/src/app/authentication/login/login.component.ts @@ -142,14 +142,18 @@ export class LoginComponent implements OnInit, OnDestroy { this.logintype = localStorage.getItem('login-type'); // tslint:disable-next-line: radix let isEng = localStorage.getItem('lang') - if(isEng){ - this.currentLang = 2; - this.language = "US"; - this.changeLanguage('2') - }else{ - this.currentLang = 1; - this.language = "AR"; - this.changeLanguage('1') + console.log('++++++++++++++++++++'+isEng) + if(isEng !== null){ + if(isEng){ + this.currentLang = 2; + this.language = "US"; + this.changeLanguage('2') + }else{ + this.currentLang = 1; + this.language = "AR"; + this.changeLanguage('1') + } + } // tslint:disable-next-line: triple-equals if (remember == 'true') { this.remeberMe = true; } else { this.remeberMe = false; }