Skip to content

Commit

Permalink
Fix version sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
TomWright committed Feb 11, 2021
1 parent 4190ec1 commit aea70f2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@
if (b.label === 'latest') {
return 1
}
let aSplit = a.label.replace(/^v/,"").split(".")
let bSplit = a.label.replace(/^v/,"").split(".")
let bSplit = b.label.replace(/^v/,"").split(".")
for (let x = 0; x < 3; x++) {
aSplit[x] = parseInt(aSplit[x])
bSplit[x] = parseInt(bSplit[x])
}
// Major
if (aSplit[0] < bSplit[0]) {
Expand Down

0 comments on commit aea70f2

Please sign in to comment.