From 4b479f06ada9037d3380cc671acc9a9477fa93d0 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Mon, 28 Oct 2024 16:03:23 +0100 Subject: [PATCH] bugfixing --- src/routes/stocks/[tickerID]/+page.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/stocks/[tickerID]/+page.svelte b/src/routes/stocks/[tickerID]/+page.svelte index cd534073..1d524db5 100644 --- a/src/routes/stocks/[tickerID]/+page.svelte +++ b/src/routes/stocks/[tickerID]/+page.svelte @@ -333,7 +333,6 @@ intervalId = setInterval(checkChart, 0); try { output = [...data?.getOneDayPrice] ?? []; - oneDayPrice = output?.map((item) => ({ time: Date?.parse(item?.time + "Z") / 1000, open: item?.open !== null ? item?.open : NaN, @@ -594,7 +593,9 @@ Promise.all(asyncFunctions) .then((results) => { - initializePrice(); + setTimeout(() => { + initializePrice(); + }, 100); }) .catch((error) => { console.error("An error occurred:", error);