From a30303e6b3df07103ff3793ef07e90981991f85d Mon Sep 17 00:00:00 2001 From: Felix Lambert Date: Wed, 3 Aug 2022 12:11:43 +0200 Subject: [PATCH 1/2] bug(usePrice): correct bug for price --- src/charts/line/usePrice.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/charts/line/usePrice.ts b/src/charts/line/usePrice.ts index 349c4f3..24a6472 100644 --- a/src/charts/line/usePrice.ts +++ b/src/charts/line/usePrice.ts @@ -14,8 +14,11 @@ export function useLineChartPrice({ if (typeof currentIndex.value === 'undefined' || currentIndex.value === -1) return ''; let price = 0; - price = data[currentIndex.value].value; - return price.toFixed(precision).toString(); + price = data[currentIndex.value]?.value; + if (price) { + return price.toFixed(precision).toString(); + } + return ''; }); const formatted = useDerivedValue(() => { let value = float.value || ''; From d7570497f44be08da711106286797574d578671d Mon Sep 17 00:00:00 2001 From: Felix Lambert Date: Wed, 3 Aug 2022 12:13:00 +0200 Subject: [PATCH 2/2] v2.1.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ee4e1c7..ddf3143 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@epsor/react-native-wagmi-charts", - "version": "2.1.4", + "version": "2.1.6", "description": "A sweet candlestick chart for React Native", "main": "lib/commonjs/index.js", "module": "lib/module/index.js",