From 4c985eec3913c774e7d582867aa76ddefe510f45 Mon Sep 17 00:00:00 2001 From: Alexander Drozdov Date: Sun, 9 Feb 2020 15:07:06 +0200 Subject: [PATCH] fix: null points unsupported by TrendChart --- src/components/Prices.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Prices.ts b/src/components/Prices.ts index 12512951..1b3acbe3 100644 --- a/src/components/Prices.ts +++ b/src/components/Prices.ts @@ -22,11 +22,11 @@ interface NinjaCurrencyInfo { includes_secondary: boolean } paySparkLine: { - data: number[] + data: Array totalChange: number } receiveSparkLine: { - data: number[] + data: Array totalChange: number } chaosEquivalent: number @@ -160,7 +160,7 @@ class PriceService { name: currency.currencyTypeName, receive: { chaosValue: currency.receive.value, - graphPoints: currency.receiveSparkLine.data, + graphPoints: currency.receiveSparkLine.data.filter(d => d != null), totalChange: currency.receiveSparkLine.totalChange }, pay: currency.pay ? { @@ -191,7 +191,7 @@ class PriceService { name: item.name, receive: { chaosValue: item.chaosValue, - graphPoints: item.sparkline.data, + graphPoints: item.sparkline.data.filter(d => d != null), totalChange: item.sparkline.totalChange } } as ItemInfo)