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 === "") {