Skip to content

Commit

Permalink
Added additional undefined check for humanReadableMax
Browse files Browse the repository at this point in the history
  • Loading branch information
kirksgithub committed Oct 16, 2023
1 parent 42f9c4f commit 0f6e1f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/DepositTokensButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const DepositTokensButton = ({
<h2>Deposit tokens</h2>
<label>
Amount to deposit
{(!amount || amount.length < 0 || parseInt(amount) < humanReadableMax) &&
{(!amount || amount.length < 0 || (humanReadableMax && parseInt(amount) < humanReadableMax)) &&
<>
&nbsp;-&nbsp;<a href="#" onClick={() => { setAmount(humanReadableMax ? humanReadableMax.toString() : '') }}>Max</a>
</>}
Expand Down

0 comments on commit 0f6e1f7

Please sign in to comment.