Skip to content

Commit

Permalink
fix initial render of apy graph throwing error, when the width is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
t0rbik committed Nov 27, 2024
1 parent 0a5949e commit b2d53db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/vaults/row/AprHistoricalChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ const AprHistoricalGraph = ({ width, height, data }: AreaProps) => {

const avg = data.reduce((acc, cur) => acc + cur.apr, 0) / data.length;

if (width === 0) return null;
return (
<>
<svg width={width} height={height}>
Expand Down

0 comments on commit b2d53db

Please sign in to comment.