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; }