Skip to content

Commit a1de222

Browse files
author
Josh Blaha
committed
Fixes the bug where you get 'toFixed is not a function' error
1 parent ec14518 commit a1de222

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "che-react-number-easing",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"author": "che.wf",
55
"repository": {
66
"type": "git",

src/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class NumberEasing extends React.Component {
2020
displayValue: value,
2121
// eslint-disable-next-line no-restricted-globals
2222
previousValue: trail && !isNaN(parseFloat(value)) ?
23-
value.toFixed(precision > -1 ? precision : 0) : value,
23+
parseFloat(value).toFixed(precision > -1 ? precision : 0) : value,
2424
};
2525
}
2626

0 commit comments

Comments
 (0)