Skip to content

Commit

Permalink
Fix linting errors in locale/index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Winnie Hellmann committed Sep 27, 2017
1 parent 3b2d68d commit 0612ee6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
karma.config.js
webpack.config.js
svg.config.js
/app/assets/javascripts/locale/**/*.js
/app/assets/javascripts/locale/**/app.js
5 changes: 2 additions & 3 deletions app/assets/javascripts/locale/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ const locales = allLocales.reduce((d, obj) => {
return data;
}, {});

let lang = document.querySelector('html').getAttribute('lang') || 'en';
lang = lang.replace(/-/g, '_');

const langAttribute = document.querySelector('html').getAttribute('lang');
const lang = (langAttribute || 'en').replace(/-/g, '_');
const locale = new Jed(locales[lang]);

/**
Expand Down

0 comments on commit 0612ee6

Please sign in to comment.