Skip to content

Commit

Permalink
fix: Prevent NaN display in stat widget
Browse files Browse the repository at this point in the history
  • Loading branch information
kjohnson committed Jan 27, 2025
1 parent a9ba5df commit bde7d1c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const StatWidget = ({label, values, description, formatter = null}) => {
</header>
<div className={styles.statWidgetAmount}>
<DisplayText>
{formatter?.format(values[0]) ?? values[0]}
{!isNaN(values[0]) ? formatter?.format(values[0]) ?? values[0] : (<span>&nbsp;</span>)}
</DisplayText>
{!! values[1] && (
<PercentChangePill value={values[0]} comparison={values[1]} />
Expand Down

0 comments on commit bde7d1c

Please sign in to comment.