diff --git a/src/routes/stocks/[tickerID]/dividends/+page.svelte b/src/routes/stocks/[tickerID]/dividends/+page.svelte index 10a33712..966f499c 100644 --- a/src/routes/stocks/[tickerID]/dividends/+page.svelte +++ b/src/routes/stocks/[tickerID]/dividends/+page.svelte @@ -5,7 +5,7 @@ export let data; let dateDistance; - let rawData; + let rawData = { history: [] }; let exDividendDate; let dividendYield; let annualDividend; @@ -59,7 +59,7 @@ } } - let htmlOutput; + let htmlOutput = `No dividend history available for ${$displayCompanyName}.`; $: { if ($stockTicker) { @@ -94,7 +94,7 @@ - {#if rawData?.history?.length !== 0} + {#if rawData?.history?.length > 0}
@@ -183,7 +183,7 @@

Dividends History

- {#if rawData?.history?.length !== 0} + {#if rawData?.history?.length > 0}