Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
Fix 1D chart
Browse files Browse the repository at this point in the history
Closes #788
  • Loading branch information
nop33 committed Aug 22, 2023
1 parent bdbf114 commit b48e71e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/HistoricWorthChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const HistoricWorthChart = memo(function HistoricWorthChart({
setChartData(getFilteredChartData(dataPoints, startingDate))
}, [addresses, alphPriceHistory, isDataAvailable, latestWorth, startingDate])

if (!isDataAvailable || chartData.length <= 2 || !firstItem || latestWorth === undefined) return null
if (!isDataAvailable || chartData.length < 2 || !firstItem || latestWorth === undefined) return null

const xAxisDatesData = chartData.map(({ date }) => date)
const yAxisWorthData = chartData.map(({ worth }) => worth)
Expand Down

0 comments on commit b48e71e

Please sign in to comment.