Merge pull request #1061 from mewtaylor/hotfix/localized-pdfs-bug

[Staging] Hotfix Fix GH-1059: Still build url localization for languages with none
This commit is contained in:
Matthew Taylor 2016-11-21 16:28:47 -05:00 committed by GitHub
commit 3ddba0a736

View file

@ -120,11 +120,12 @@ for (var v in routes) {
localizedAssetUrls[routes[v].name] = {};
var assetUrls = require(l10nStatic);
for (var lang in localizedUrls) {
for (var lang in languages) {
localizedAssetUrls[routes[v].name][lang] = {};
var langUrls = localizedUrls[lang] || {};
for (var key in assetUrls) {
if (localizedUrls[lang].hasOwnProperty(key)) {
localizedAssetUrls[routes[v].name][lang][key] = localizedUrls[lang][key];
if (langUrls.hasOwnProperty(key)) {
localizedAssetUrls[routes[v].name][lang][key] = langUrls[key];
} else {
localizedAssetUrls[routes[v].name][lang][key] = assetUrls[key];
}