Skip to content

Commit 2164cfa

Browse files
committed
Build rows from shuffled contributors
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent 7794670 commit 2164cfa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

generate-stats.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ function generateTemplate(data) {
8686
});
8787
}
8888
89-
function shuffle(array) {
90-
for (let i = array.length - 1; i > 0; i--) {
89+
function shuffle(arr) {
90+
for (let i = arr.length - 1; i > 0; i--) {
9191
let j = Math.floor(Math.random() * (i + 1));
9292
93-
[array[i], array[j]] = [array[j], array[i]];
93+
[arr[i], arr[j]] = [arr[j], arr[i]];
9494
}
9595
}
9696
@@ -110,7 +110,7 @@ function generateTemplate(data) {
110110
rowsString += '<div class="user-row">';
111111
112112
for (var i = 0; i < r; i++) {
113-
rowsString += userTemplate(contributors.shift());
113+
rowsString += userTemplate(filtered.shift());
114114
}
115115
116116
rowsString += '</div>';

0 commit comments

Comments
 (0)