Procházet zdrojové kódy

Fix "undefined" appearing when rendering small numbers

tags/v0.1.0
Fen Dweller před 5 roky
rodič
revize
026bb67c64
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: E80B35A6F11C3656
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. +2
    -2
      numbers.js

+ 2
- 2
numbers.js Zobrazit soubor

@@ -6,7 +6,7 @@ function numberTextSmall(val, places = 1, smallPlaces = 0) {
if (isNaN(val)) {
throw new RangeError("Invalid number: " + val);
}
if (val < Math.pow(10, (places+2))) {
if (val < Math.pow(10, (places+3))) {
return round(val, smallPlaces);
}

@@ -26,7 +26,7 @@ function numberText(val, places = 1, smallPlaces = 0) {
if (isNaN(val)) {
throw new RangeError("Invalid number: " + val);
}
if (val < Math.pow(10, (places+2))) {
if (val < Math.pow(10, (places+3))) {
return round(val, smallPlaces);
}



Načítá se…
Zrušit
Uložit