Skip to content

Commit b5015cc

Browse files
committed
Fixed version sorting
1 parent eac2186 commit b5015cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/versioning.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function compareV(v1, v2) {
4545
return nd;
4646
}
4747
else {
48-
return v1.suffix.localeCompare(v2.suffix);
48+
return -v1.suffix.localeCompare(v2.suffix);
4949
}
5050
}
5151

@@ -71,7 +71,7 @@ function initVersions() {
7171
}
7272

7373
for (var key in vs) {
74-
vs[key].all.sort((v1, v2) => {return -v1.suffix.localeCompare(v2.suffix);});
74+
vs[key].all.sort(compareV);
7575
vs[key].latest = vs[key].all[0];
7676
DOC_SORTED_VERSIONS.push(vs[key].latest);
7777
}

0 commit comments

Comments
 (0)