Skip to content

Commit

Permalink
fix: conditional check for amount (#1516)
Browse files Browse the repository at this point in the history
* fix: conditional check for amount

* fix: revert slice change
  • Loading branch information
tomjeatt authored Aug 9, 2023
1 parent 238690b commit 22f012e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const LockedCollateralCard = ({
if (cumulativeVolumes === undefined) {
throw new Error('Something went wrong!');
}
const totalLockedCollateralTokenAmount = cumulativeVolumes.slice(-1)[0].amount;
const totalLockedCollateralTokenAmount = cumulativeVolumes.slice(-1)[0]?.amount;

let chartLineColor;
if (process.env.REACT_APP_RELAY_CHAIN_NAME === POLKADOT) {
Expand Down

2 comments on commit 22f012e

@vercel
Copy link

@vercel vercel bot commented on 22f012e Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 22f012e Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.