Showing
1 changed file
with
2 additions
and
1 deletions
| ... | ... | @@ -25,7 +25,6 @@ | 
| 25 | 25 | |
| 26 | 26 | if (_value.length > max) return ''.padStart(max, '9'); | 
| 27 | 27 | if (_value.length < max) return _value.padStart(max, '0'); | 
| 28 | - | |
| 29 | 28 | return _value; | 
| 30 | 29 | }); | 
| 31 | 30 | |
| ... | ... | @@ -38,6 +37,8 @@ | 
| 38 | 37 | |
| 39 | 38 | let _value = number.toString().split('.')[1] || '0'; | 
| 40 | 39 | |
| 40 | + if (_value.length == 1) return _value + '0'; | |
| 41 | + | |
| 41 | 42 | if (_value.length < keepNumber) return ''.padStart(keepNumber, '0'); | 
| 42 | 43 | |
| 43 | 44 | if (_value.length > keepNumber) return _value.slice(0, 2); | ... | ... |