File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 31
31
"lint:js" : " ./node_modules/.bin/eslint --ext .js,.jsx ." ,
32
32
"test" : " npm run lint && npm run jest"
33
33
},
34
- "version" : " 0.7.11-8 " ,
34
+ "version" : " 0.7.11-14 " ,
35
35
"dependencies" : {
36
36
"auth0-js" : " ^6.8.4" ,
37
37
"config" : " ^3.2.0" ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ function removeDecimal(num) {
13
13
}
14
14
15
15
function toAcurateFixed ( num , decimal ) {
16
- const re = new RegExp ( `^-?\\d+(?:.\\d{0,${ ( decimal - 1 ) } })?` ) ;
16
+ const re = new RegExp ( `^-?\\d+(?:.\\d{0,${ ( decimal ) } })?` ) ;
17
17
return num . toString ( ) . match ( re ) [ 0 ] ;
18
18
}
19
19
@@ -24,7 +24,7 @@ function toFixed(num, decimal) {
24
24
const result = _ . toFinite ( toAcurateFixed ( num , decimal ) ) ;
25
25
const integerResult = _ . toFinite ( removeDecimal ( num ) ) ;
26
26
27
- if ( _ . isInteger ( integerResult ) ) {
27
+ if ( _ . isInteger ( result ) ) {
28
28
return integerResult ;
29
29
}
30
30
return result ;
You can’t perform that action at this time.
0 commit comments