Skip to content

Commit ba42fb8

Browse files
committed
Minor leaderboard fix
1 parent 60ac0da commit ba42fb8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

leaderboard.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ <h3>Leaderboard</h3>
107107
var table = '<table class=\'leaderboard\'><thead><th>Position</th><th class=\'handle\'>GitHub Handle</th><th>Score</th></thead><tbody>';
108108
var pos = 0, currScore = -1;
109109

110-
for(var i = 0; i<(rows.length<=25?rows.length:25); i++) {
110+
for(var i = 0; ; i++) {
111111
var cells = rows[i].split(',');
112112
if (cells.length != 2) {
113113
$('#leader-div').html('<p>Data could not be parsed.</p>');
@@ -117,6 +117,10 @@ <h3>Leaderboard</h3>
117117
if (cells[1] != currScore) {
118118
pos = i+1;
119119
}
120+
121+
if (pos>25 && cells[1] != currScore) {
122+
break;
123+
}
120124

121125
currScore = cells[1];
122126

0 commit comments

Comments
 (0)