diff --git a/src/main.js b/src/main.js index 2671d470..efe2bae9 100644 --- a/src/main.js +++ b/src/main.js @@ -88,12 +88,17 @@ const mixin = { return str; }, numberFormat(num) { - const formatter = Intl.NumberFormat( - `${this.getPreferenceString("hl")}-${this.getPreferenceString("region")}`, - { - notation: "compact", - }, - ); + var loc = `${this.getPreferenceString("hl")}-${this.getPreferenceString("region")}`; + + try { + Intl.getCanonicalLocales(loc); + } catch { + loc = undefined; + } + + const formatter = Intl.NumberFormat(loc, { + notation: "compact", + }); return formatter.format(num); }, addCommas(num) {