From 66baa0344d4b774f4f57ac49e3270b533f6e31f3 Mon Sep 17 00:00:00 2001 From: Pietro Rodolfo Masera Date: Mon, 29 May 2023 18:24:20 +0200 Subject: [PATCH] Low On Caffeine, Please Forgive Coding Style --- stockingly-frontend/src/components/StockPrice.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stockingly-frontend/src/components/StockPrice.vue b/stockingly-frontend/src/components/StockPrice.vue index f315d2e..d4d31e3 100644 --- a/stockingly-frontend/src/components/StockPrice.vue +++ b/stockingly-frontend/src/components/StockPrice.vue @@ -111,7 +111,9 @@ const maxPrice = computed(() => { if (Date.parse(d.date) > maxDate) { maxDate = Date.parse(d.date); for (const ticker in maxVal) { - maxVal[ticker] = d[ticker] as number; + if (typeof d[ticker] === 'number' && !isNaN(d[ticker] as number)) { + maxVal[ticker] = d[ticker] as number; + } } } }