From 344ff2c5c2d5265e6dfd7c4261ac7fe3ba8c5e30 Mon Sep 17 00:00:00 2001 From: Aaron Dalton Date: Wed, 25 Dec 2024 15:04:48 -0700 Subject: [PATCH] Edge case for people with no timeouts --- src/components/Player/Timeouts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Player/Timeouts.js b/src/components/Player/Timeouts.js index 980478b..d6019e6 100644 --- a/src/components/Player/Timeouts.js +++ b/src/components/Player/Timeouts.js @@ -26,7 +26,7 @@ function Timeouts({ order }) { } const toIndiv = summary.players.timeouts.filter(rec => rec.user === user.id); timeoutsSetter(toIndiv); - const toLatest = Math.max(...toIndiv.map(rec => rec.value)); + const toLatest = Math.max(0, ...toIndiv.map(rec => rec.value)); let count = 0; for (const rec of allRecs) { const datems = new Date(rec.header["date-end"]).getTime();