Commit 077075be authored by Alex Beregszaszi's avatar Alex Beregszaszi

More optimised way to sort in reverse

parent 1b8972a9
......@@ -529,10 +529,9 @@ var run = function () {
// Sort builds according to semver
var builds = data.builds.sort(function (a, b) {
a = buildVersion(a);
b = buildVersion(b);
return semver.compare(a, b);
}).reverse();
// NOTE: b vs. a (the order is important), because we want latest first in the list
return semver.compare(buildVersion(b), buildVersion(a));
});
// populate version dropdown with all available compiler versions
$.each(builds, function (i, build) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment