diff --git a/sources/js/index.js b/sources/js/index.js index 68e0fc7..230d2f9 100644 --- a/sources/js/index.js +++ b/sources/js/index.js @@ -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");