From c519a22456ce912d9a035c8b49bd1ed44ace2d0b Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Fri, 5 Apr 2024 18:22:26 +0200 Subject: [PATCH] Check for oldest/ highest column --- components/chart/chart.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/chart/chart.js b/components/chart/chart.js index b013730..5f258c2 100644 --- a/components/chart/chart.js +++ b/components/chart/chart.js @@ -140,7 +140,7 @@ const CycleChart = ({ navigate, setDate }) => { ) const leftmostVisibleIndexInView = rightmostVisibleIndexInView + numberOfColumnsToRender >= columns.length - ? 153 + ? columns.length - 1 : rightmostVisibleIndexInView + numberOfColumnsToRender // detect leftmost aka oldest visible day to render its month dynamically return columns[leftmostVisibleIndexInView]