Skip to content

Commit

Permalink
fix: catch unsupported languages
Browse files Browse the repository at this point in the history
  • Loading branch information
friedjoff committed Sep 21, 2020
1 parent d5198a5 commit 04c0137
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@geops/tree-app",
"description": "Web app for tree recommendations.",
"license": "MIT",
"version": "2.0.1",
"version": "2.0.2",
"private": true,
"dependencies": {
"history": "4.10.1",
Expand Down
4 changes: 1 addition & 3 deletions src/i18n/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ i18n
interpolation: {
escapeValue: false, // not needed for React as it escapes by default
},
language: 'de',
resources,
});

// Catch missing language for old versions
if (!i18n.language) {
if (['de', 'fr'].includes(i18n.language) === false) {
i18n.changeLanguage('de');
}

Expand Down

0 comments on commit 04c0137

Please sign in to comment.