From bb2f00c41dd2b0b80642c0e8cc53438f69c488f9 Mon Sep 17 00:00:00 2001 From: Raphaƫl Stefanini Date: Tue, 26 Oct 2021 22:33:23 +0300 Subject: Fix error if language doesn't have translation. (#221) Cause the page not to load. Fixes #214 --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/App.js b/src/App.js index 4e060cf..1a3058d 100644 --- a/src/App.js +++ b/src/App.js @@ -32,7 +32,7 @@ function App() { const htmlDirection = (languageID) => { languageID = languageID || i18n.language; - const rtl = Translations.filter((t) => t.id === languageID)[0].rtl; + const rtl = Translations.filter((t) => t.id === languageID)[0]?.rtl; return rtl ? 'rtl' : 'ltr'; }; -- cgit v1.2.3