Skip to content

Commit

Permalink
Website: Fix Download page not handling multiple dependencies when fr…
Browse files Browse the repository at this point in the history
…om Redownload URL
  • Loading branch information
Golmote committed May 16, 2018
1 parent 38ce121 commit c2ff248
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions download.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,26 @@ if (hstr) {
}
setTheme(ids[0]);
}
ids.forEach(function(id) {
var makeDefault = function (id) {
if (id !== 'meta') {
if (components[category][id]) {
var requireId = id;
while (requireId && components[category][requireId] && components[category][requireId].option !== 'default') {
if (typeof components[category][requireId] === 'string') {
components[category][requireId] = { title: components[category][requireId] }
if (components[category][id].option !== 'default') {
if (typeof components[category][id] === 'string') {
components[category][id] = { title: components[category][id] }
}
components[category][requireId].option = 'default';
requireId = components[category][requireId].require;
components[category][id].option = 'default';
}
if (components[category][id].require) {
var deps = components[category][id].require;
if ($u.type(deps) !== 'array') {
deps = [deps];
}
deps.forEach(makeDefault);
}
}
}
});
};
ids.forEach(makeDefault);
}
});
}
Expand Down

0 comments on commit c2ff248

Please sign in to comment.