CP Fixing undefined language bug
This commit is contained in:
parent
edf63e1dae
commit
d114ba16c3
@ -82,11 +82,15 @@ export class AppComponent implements OnInit {
|
|||||||
this.Password = null;
|
this.Password = null;
|
||||||
this._authService.IsLoggedIn = true;
|
this._authService.IsLoggedIn = true;
|
||||||
console.log(this.ConnectedUser.language);
|
console.log(this.ConnectedUser.language);
|
||||||
|
if (this.ConnectedUser.language === null) {
|
||||||
|
this._translateService.setDefaultLang('en');
|
||||||
|
} else {
|
||||||
if (this.ConnectedUser.language === 'gb') {
|
if (this.ConnectedUser.language === 'gb') {
|
||||||
this._translateService.setDefaultLang('en');
|
this._translateService.setDefaultLang('en');
|
||||||
} else {
|
} else {
|
||||||
this._translateService.setDefaultLang(this.ConnectedUser.language);
|
this._translateService.setDefaultLang(this.ConnectedUser.language);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this._translateService.setDefaultLang('en');
|
this._translateService.setDefaultLang('en');
|
||||||
}
|
}
|
||||||
@ -173,6 +177,7 @@ export class AppComponent implements OnInit {
|
|||||||
public CreateProfile() {
|
public CreateProfile() {
|
||||||
if (this.CorrectForm()) {
|
if (this.CorrectForm()) {
|
||||||
this.CreateUser.deviceIds = [];
|
this.CreateUser.deviceIds = [];
|
||||||
|
this.CreateUser.language = 'gb';
|
||||||
this._userService.CreateUser(this.CreateUser)
|
this._userService.CreateUser(this.CreateUser)
|
||||||
|
|
||||||
.subscribe(
|
.subscribe(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user