From 38ac3674fa8d470763ffaa5e492968c68e324d9f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 26 Sep 2023 13:36:48 +0200 Subject: [PATCH] appstore: fix popularity sorting --- store/templates/catalog.html | 2 +- store/templates/wishlist.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/store/templates/catalog.html b/store/templates/catalog.html index eade21bf..e80221da 100644 --- a/store/templates/catalog.html +++ b/store/templates/catalog.html @@ -239,7 +239,7 @@ } else if (sortBy === "popularity") { 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 === "") { diff --git a/store/templates/wishlist.html b/store/templates/wishlist.html index 3aca66a8..d1722f76 100644 --- a/store/templates/wishlist.html +++ b/store/templates/wishlist.html @@ -211,7 +211,7 @@ } else if (sortBy === "popularity") { 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 === "") {