Skip to content

Commit

Permalink
Merge pull request #84 from chuckdumont/work2
Browse files Browse the repository at this point in the history
Fix i18n loader bug causing failure to load module errors for excluded locales
  • Loading branch information
chuckdumont committed Nov 15, 2017
2 parents ebccf5d + db982b2 commit b9e5060
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion loaders/dojo/i18n/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = function(content) {
}
// Add locales with greater specificity
Object.keys(bundle).forEach(function(loc) {
if (loc.startsWith(requestedLocale + "-")) {
if (bundle[loc] && loc.startsWith(requestedLocale + "-")) {
result.push(loc);
}
});
Expand Down
1 change: 1 addition & 0 deletions test/TestCases/loaders/i18n/nls/strings1.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ define({
}),
"en-au":true,
"fr":true,
"fr-fr": false,
"es":true,
"de":false
});

0 comments on commit b9e5060

Please sign in to comment.