Skip to content

Commit

Permalink
Edge case for people with no timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlkonig committed Dec 25, 2024
1 parent c675c85 commit 344ff2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Player/Timeouts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 344ff2c

Please sign in to comment.