Skip to content

Commit

Permalink
fix: preserve trailing zeros in number formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
UmakanthKaspa authored Dec 23, 2024
1 parent e983655 commit d9a6638
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frontend/src2/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export function formatNumber(number: number, precision = 2) {
precision = precision || guessPrecision(number)
const locale = session.user?.country == 'India' ? 'en-IN' : session.user?.locale
return new Intl.NumberFormat(locale || 'en-US', {
minimumFractionDigits: precision,
maximumFractionDigits: precision,
}).format(number)
}
Expand Down

0 comments on commit d9a6638

Please sign in to comment.