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 () { ...@@ -529,10 +529,9 @@ var run = function () {
// Sort builds according to semver // Sort builds according to semver
var builds = data.builds.sort(function (a, b) { var builds = data.builds.sort(function (a, b) {
a = buildVersion(a); // NOTE: b vs. a (the order is important), because we want latest first in the list
b = buildVersion(b); return semver.compare(buildVersion(b), buildVersion(a));
return semver.compare(a, b); });
}).reverse();
// populate version dropdown with all available compiler versions // populate version dropdown with all available compiler versions
$.each(builds, function (i, build) { $.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