Skip to content

Commit

Permalink
Fixed a bad call when no language is defined in browser, lng argument…
Browse files Browse the repository at this point in the history
… will be a boolean.
  • Loading branch information
Cesar Alvernaz committed Nov 24, 2012
1 parent 4771bb5 commit ff9c1cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/i18next.helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ var f = {
},
toLanguages: function(lng) {
var languages = [];
if (lng.indexOf('-') > -1) {
if (typeof lng === 'string' && lng.indexOf('-') > -1) {
var parts = lng.split('-');

lng = o.lowerCaseLng ?
Expand Down

0 comments on commit ff9c1cd

Please sign in to comment.