diff --git a/index.html b/index.html
index 1f6f9d4a..78bae2f0 100644
--- a/index.html
+++ b/index.html
@@ -313,16 +313,16 @@
Find Great Open Source Opportunities.
}
function sortByGoodFirstIssues(repos) {
-
- function compare(a, b) {
- return returnComp(a.issues.length, b.issues.length, a.starcount, b.starcount)
- };
-
-
- repos.sort(compare);
- return repos;
+ repos.sort((a, b) => {
+ if (b.issues.length === a.issues.length) {
+ return b.starcount - a.starcount; // Tie-breaker
+ }
+ return b.issues.length - a.issues.length;
+ });
+ return repos;
}
+
function returnComp(a, b, tiebreaker1, tiebreaker2) {
@@ -341,15 +341,12 @@ Find Great Open Source Opportunities.
function sortByStars(repos) {
- function compare(a, b) {
- return returnComp(a.starcount, b.starcount, a.issues.length, b.issues.length)
- };
-
- repos.sort(compare);
- return repos;
+ repos.sort((a, b) => b.starcount - a.starcount);
+ return repos;
}
+
function sortBy(value, repositories) {
switch (value) {