From 36fffb74386b0af0bc9d01aed32cbb43ef97c177 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Wed, 11 Dec 2024 23:32:17 +0100 Subject: [PATCH] bugfixing --- src/routes/stocks/[tickerID]/statistics/+page.svelte | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/routes/stocks/[tickerID]/statistics/+page.svelte b/src/routes/stocks/[tickerID]/statistics/+page.svelte index 12d45b02..fd81b177 100644 --- a/src/routes/stocks/[tickerID]/statistics/+page.svelte +++ b/src/routes/stocks/[tickerID]/statistics/+page.svelte @@ -910,7 +910,12 @@

- {$stockTicker} does not appear to pay any dividends at this time. + {#if rawData?.annualDividend !== null && rawData?.dividendYield !== null} + {$stockTicker} pays an annual dividend of ${rawData?.annualDividend}, + which amounts to a dividend yield of {rawData?.dividendYield}%. + {:else} + {$stockTicker} does not appear to pay any dividends at this time. + {/if}

{rawData?.dividendYield !== null - ? rawData?.dividendYield + ? rawData?.dividendYield + "%" : "n/a"}