Skip to content

Commit 344ff2c

Browse files
committed
Edge case for people with no timeouts
1 parent c675c85 commit 344ff2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Player/Timeouts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function Timeouts({ order }) {
2626
}
2727
const toIndiv = summary.players.timeouts.filter(rec => rec.user === user.id);
2828
timeoutsSetter(toIndiv);
29-
const toLatest = Math.max(...toIndiv.map(rec => rec.value));
29+
const toLatest = Math.max(0, ...toIndiv.map(rec => rec.value));
3030
let count = 0;
3131
for (const rec of allRecs) {
3232
const datems = new Date(rec.header["date-end"]).getTime();

0 commit comments

Comments
 (0)