From 6dcc32ba8f5609581c219048fca538062ad1270b Mon Sep 17 00:00:00 2001 From: dhmmasson <5263585+dhmmasson@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:16:52 +0200 Subject: [PATCH] fix: fix NaN in highscore computation --- src/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui.js b/src/ui.js index 5e20313..3de718c 100644 --- a/src/ui.js +++ b/src/ui.js @@ -64,7 +64,7 @@ function displayMenu() { textAlign(CENTER, TOP); fill(colors["Vanilla"]); text( - "Higscore " + Game.highscores.reduce(max, 0), + "Higscore " + Game.highscores.reduce((a, e) => max(a, e), 0), Game.board.size.width / 2, 10 );