Skip to content

Commit

Permalink
Add guard for translations to explode
Browse files Browse the repository at this point in the history
  • Loading branch information
janwerkhoven committed Sep 11, 2023
1 parent b58e306 commit 7485bd3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/services/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ export default class TranslationService extends Service {
// interflux.mx = es
//
get language() {
if (!ENV.locale) {
console.warn('no language set', ENV.locale);
return 'en';
}

return ENV.locale.slice(0, 2);
}

Expand Down

0 comments on commit 7485bd3

Please sign in to comment.