Fix scoreboard sort
This commit is contained in:
parent
8c067f1a3a
commit
2f08db7f09
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ function updateLives(l) {
|
|||
|
||||
function reloadScoreBoard() {
|
||||
scoreBoard.querySelectorAll("div").forEach(d => d.remove());
|
||||
for (const s of scores.sort(s => s.score).reverse()) {
|
||||
for (const s of scores.sort((a, b) => a.score - b.score).reverse()) {
|
||||
const e = document.createElement("div");
|
||||
e.classList.add("row-score");
|
||||
const p1 = document.createElement("p");
|
||||
|
|
Reference in a new issue