Merge pull request #2430 from dpalou/MOBILE-3462

MOBILE-3462 lang: Fix error when direction had wrong value
This commit is contained in:
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

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