Skip to content

Commit b9e5060

Browse files
author
Chuck Dumont
authored
Merge pull request #84 from chuckdumont/work2
Fix i18n loader bug causing failure to load module errors for excluded locales
2 parents ebccf5d + db982b2 commit b9e5060

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

loaders/dojo/i18n/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module.exports = function(content) {
3838
}
3939
// Add locales with greater specificity
4040
Object.keys(bundle).forEach(function(loc) {
41-
if (loc.startsWith(requestedLocale + "-")) {
41+
if (bundle[loc] && loc.startsWith(requestedLocale + "-")) {
4242
result.push(loc);
4343
}
4444
});

test/TestCases/loaders/i18n/nls/strings1.js

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define({
44
}),
55
"en-au":true,
66
"fr":true,
7+
"fr-fr": false,
78
"es":true,
89
"de":false
910
});

0 commit comments

Comments
 (0)