Merge pull request #2430 from dpalou/MOBILE-3462

MOBILE-3462 lang: Fix error when direction had wrong value
main
Juan Leyva 2020-07-02 10:32:40 +02:00 committed by GitHub
commit 055ba34792
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
});
}