Skip to content

Commit 9ad5531

Browse files
committed
MOBILE-3462 lang: Fix error when direction had wrong value
1 parent 22266da commit 9ad5531

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/providers/lang.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ export class CoreLangProvider {
5555

5656
translate.onLangChange.subscribe((event: any) => {
5757
platform.setLang(event.lang, true);
58-
platform.setDir(this.translate.instant('core.thisdirection'), true);
58+
59+
const dir = this.translate.instant('core.thisdirection');
60+
platform.setDir(dir.indexOf('rtl') != -1 ? 'rtl' : 'ltr', true);
5961
});
6062
}
6163

0 commit comments

Comments
 (0)