소스 검색

Fix "undefined" appearing when rendering small numbers

tags/v0.1.0
Fen Dweller 5 년 전
부모
커밋
026bb67c64
No known key found for this signature in database GPG 키 ID: E80B35A6F11C3656
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      numbers.js

+ 2
- 2
numbers.js 파일 보기

@@ -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);
}



불러오는 중...
취소
저장