diff --git a/common/util/format.ts b/common/util/format.ts index 9b202d25..4507bada 100644 --- a/common/util/format.ts +++ b/common/util/format.ts @@ -6,7 +6,8 @@ const formatter = new Intl.NumberFormat('en-US', { }) export function formatMoney(amount: number) { - return 'M$ ' + formatter.format(amount).replace('$', '') + const newAmount = Math.round(amount) === 0 ? 0 : amount // handle -0 case + return 'M$ ' + formatter.format(newAmount).replace('$', '') } export function formatWithCommas(amount: number) {