From 79fd4bcd1424d0f4a5ac7975c6f830051f9d52a4 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Sat, 5 Sep 2020 01:11:57 +0300 Subject: [PATCH] fixes #78 --- frontend-react/src/components/xtrends/WeaponLineChart.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend-react/src/components/xtrends/WeaponLineChart.tsx b/frontend-react/src/components/xtrends/WeaponLineChart.tsx index 20b8e32b0..4f795c0a4 100644 --- a/frontend-react/src/components/xtrends/WeaponLineChart.tsx +++ b/frontend-react/src/components/xtrends/WeaponLineChart.tsx @@ -49,8 +49,8 @@ const WeaponLineChart: React.FC = ({ return [...acc, ...cur[mode].slice(1)] as number[] }, []) - let nextMonth = 4 - let nextYear = 2018 + let nextMonth = counts[0].year === 2018 ? 4 : 0 + let nextYear = counts[0].year return countsPutTogether.reduce( (acc: { name: string; "Top 500 results": number }[], cur) => {