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

Commit

Permalink
changing Optional Chaining for ternary, since we need to cover an opt…
Browse files Browse the repository at this point in the history
…ion where amount is NaN (#463)
  • Loading branch information
mmilenkovic authored May 4, 2021
1 parent caf8457 commit 5205878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/shared/fiat-amount/fiat-amount.view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function FiatAmount ({ amount, currency }) {

return (
<div className={classes.root}>
{CurrencySymbol[currency].symbol} {amount?.toFixed(2) || '--'}
{CurrencySymbol[currency].symbol} {amount ? amount.toFixed(2) : '--'}
</div>
)
}
Expand Down

0 comments on commit 5205878

Please sign in to comment.