Skip to content

Commit

Permalink
changed max amount of local scores to 5 for scrolling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur-adriansens authored Nov 22, 2023
1 parent 765e095 commit 122e9a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ const local_scores = (clear = false) => {
.slice()
.sort((a, b) => b - a);

if (sortedScores.length >= 10) {
sortedScores.splice(10);
if (sortedScores.length >= 5) {
sortedScores.splice(5);
}

window.localStorage.setItem("scores", sortedScores);
Expand Down

0 comments on commit 122e9a5

Please sign in to comment.