diff options
| author | Raphaƫl Stefanini <rphlo@users.noreply.github.com> | 2021-10-26 22:33:23 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-26 12:33:23 -0700 |
| commit | bb2f00c41dd2b0b80642c0e8cc53438f69c488f9 (patch) | |
| tree | 41e82a9de96dfad9ad436c827d0751f1a51f8f8d | |
| parent | 42b48cd9bfd8908a11634776410a6e3a271cbbd8 (diff) | |
Fix error if language doesn't have translation. (#221)
Cause the page not to load.
Fixes #214
| -rw-r--r-- | src/App.js | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -32,7 +32,7 @@ function App() { | |||
| 32 | 32 | ||
| 33 | const htmlDirection = (languageID) => { | 33 | const htmlDirection = (languageID) => { |
| 34 | languageID = languageID || i18n.language; | 34 | languageID = languageID || i18n.language; |
| 35 | const rtl = Translations.filter((t) => t.id === languageID)[0].rtl; | 35 | const rtl = Translations.filter((t) => t.id === languageID)[0]?.rtl; |
| 36 | return rtl ? 'rtl' : 'ltr'; | 36 | return rtl ? 'rtl' : 'ltr'; |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
