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

Commit

Permalink
Merge pull request #790 from alephium/fix-chart
Browse files Browse the repository at this point in the history
Fix  1D chart
  • Loading branch information
nop33 authored Aug 22, 2023
2 parents bdbf114 + b48e71e commit b42cd61
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 b42cd61

Please sign in to comment.