Skip to content

Commit

Permalink
fix: fixed numberFormatter bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Jar-bogulak committed Sep 30, 2019
1 parent 6253223 commit 4bcf2de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/filters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function numberFormatter(num, digits) {
]
for (let i = 0; i < si.length; i++) {
if (num >= si[i].value) {
return (num / si[i].value + 0.1).toFixed(digits).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, '$1') + si[i].symbol
return (num / si[i].value).toFixed(digits).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, '$1') + si[i].symbol
}
}
return num.toString()
Expand Down

0 comments on commit 4bcf2de

Please sign in to comment.