Skip to content

Commit

Permalink
Use languages[0] instead of language
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch committed Nov 2, 2017
1 parent 5a43e54 commit 4507759
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/I18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class I18n extends Component {
this.options.wait = false;
}

const { language } = this.i18n;
const language = this.i18n.languages && this.i18n.languages[0];
const ready = !!language && this.namespaces.every(ns => this.i18n.hasResourceBundle(language, ns));

this.state = {
Expand Down
1 change: 1 addition & 0 deletions test/I18n.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import I18n from '../src/I18n';

const i18n = {
language: 'en',
languages: ['en'],
options: {
defaultNS: 'defaultNS'
},
Expand Down

0 comments on commit 4507759

Please sign in to comment.