From cdf9942924a365abe7222016f662e1e0bf107245 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 14 Oct 2024 01:43:00 +0100 Subject: [PATCH] fix playerchart --- .../src/components/player/chart/generic-player-chart.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/website/src/components/player/chart/generic-player-chart.tsx b/projects/website/src/components/player/chart/generic-player-chart.tsx index 476a001..0a2700f 100644 --- a/projects/website/src/components/player/chart/generic-player-chart.tsx +++ b/projects/website/src/components/player/chart/generic-player-chart.tsx @@ -57,7 +57,7 @@ export default function GenericPlayerChart({ player, datasetConfig }: Props) { let currentHistoryIndex = 0; // 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(); targetDate.setDate(today.getDate() - dayAgo);