MOBILE-3462 lang: Fix error when direction had wrong value

main
Dani Palou 2020-07-01 14:07:50 +02:00
parent 22266da7a7
commit 9ad5531076
1 changed files with 3 additions and 1 deletions

View File

@ -55,7 +55,9 @@ export class CoreLangProvider {
translate.onLangChange.subscribe((event: any) => {
platform.setLang(event.lang, true);
platform.setDir(this.translate.instant('core.thisdirection'), true);
const dir = this.translate.instant('core.thisdirection');
platform.setDir(dir.indexOf('rtl') != -1 ? 'rtl' : 'ltr', true);
});
}