1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

appstore: fix popularity sorting

This commit is contained in:
Alexandre Aubin 2023-09-26 13:36:48 +02:00
parent 158071f64e
commit 38ac3674fa
2 changed files with 2 additions and 2 deletions

View file

@ -239,7 +239,7 @@
} }
else if (sortBy === "popularity") { else if (sortBy === "popularity") {
toSort.sort(function(a, b) { toSort.sort(function(a, b) {
return a.dataset.stars < b.dataset.stars ? 1 : -1; return parseInt(a.dataset.stars) < parseInt(b.dataset.stars) ? 1 : -1;
}); });
} }
else if (sortBy === "") { else if (sortBy === "") {

View file

@ -211,7 +211,7 @@
} }
else if (sortBy === "popularity") { else if (sortBy === "popularity") {
toSort.sort(function(a, b) { toSort.sort(function(a, b) {
return a.dataset.stars < b.dataset.stars ? 1 : -1; return parseInt(a.dataset.stars) < parseInt(b.dataset.stars) ? 1 : -1;
}); });
} }
else if (sortBy === "") { else if (sortBy === "") {