Fix very large number appearing as NaN

This commit is contained in:
Olivier Gagnon
2021-05-26 14:14:20 -04:00
parent ba4169268c
commit 7fedd1f1f5
5 changed files with 7 additions and 5 deletions
+3 -1
View File
@@ -56,7 +56,9 @@ class NumeralFormatter {
if(Math.abs(n) < 1000) {
return this.format(n, "$0.00");
}
return this.format(n, "$0.000a");
const str = this.format(n, "$0.000a");
if(str === "$NaNt") return '$'+this.format(n, '0.000e0');
return str;
}
formatSkill(n: number): string {