Commit 02a77254 authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

fix: retain sig figs in localized nums (#3280)

parent 69ed7015
...@@ -15,6 +15,7 @@ export default function formatLocaleNumber({ number, locale, sigFigs, options = ...@@ -15,6 +15,7 @@ export default function formatLocaleNumber({ number, locale, sigFigs, options =
} else { } else {
localeArg = [locale, DEFAULT_LOCALE] localeArg = [locale, DEFAULT_LOCALE]
} }
options.maximumSignificantDigits = options.maximumSignificantDigits || sigFigs
if (typeof number === 'number') { if (typeof number === 'number') {
return number.toLocaleString(localeArg, options) return number.toLocaleString(localeArg, options)
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment