From f2763c6e32b3e9e677ec76376fb0ed1895ca5c8d Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Thu, 9 Jan 2025 11:36:23 +0100 Subject: [PATCH] bugfixing --- src/routes/stocks/[tickerID]/forecast/+page.svelte | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/routes/stocks/[tickerID]/forecast/+page.svelte b/src/routes/stocks/[tickerID]/forecast/+page.svelte index 7b26f35f..03171d68 100644 --- a/src/routes/stocks/[tickerID]/forecast/+page.svelte +++ b/src/routes/stocks/[tickerID]/forecast/+page.svelte @@ -15,7 +15,6 @@ import { CanvasRenderer } from "echarts/renderers"; export let data; - use([ LineChart, GaugeChart, @@ -57,9 +56,7 @@ while (year > 0) { // Ensure we don't loop indefinitely // Find the index where the item's date matches the current year and revenue is null - const index = data?.findIndex( - (item) => item?.date === year && item?.revenue === null, - ); + const index = data?.findIndex((item) => item?.date === year); // If index is found and there is at least one item in the data for this year with non-null revenue if (index !== -1) {