fix playerchart
All checks were successful
Deploy Website / deploy (push) Successful in 5m6s

This commit is contained in:
Lee 2024-10-14 01:43:00 +01:00
parent 67c1775edb
commit cdf9942924

@ -57,7 +57,7 @@ export default function GenericPlayerChart({ player, datasetConfig }: Props) {
let currentHistoryIndex = 0; let currentHistoryIndex = 0;
// Iterate from historyDays-1 to 0 (last 'historyDays' days) // Iterate from historyDays-1 to 0 (last 'historyDays' days)
for (let dayAgo = historyDays; dayAgo >= 0; dayAgo--) { for (let dayAgo = historyDays - 1; dayAgo >= 0; dayAgo--) {
const targetDate = new Date(); const targetDate = new Date();
targetDate.setDate(today.getDate() - dayAgo); targetDate.setDate(today.getDate() - dayAgo);