Skip to content

Commit

Permalink
fix(rangeSlider): round the slider pit value (#3758)
Browse files Browse the repository at this point in the history
* fix(Pit): round the slider pit value (#2904)

* fix(Slider): use parseInt base
  • Loading branch information
francoischalifour authored May 6, 2019
1 parent e904ad6 commit 6edee3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Slider/Pit.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Pit = ({ style, children }) => {
// Children could be an array, unwrap the value if it's the case
// see: https://github.com/developit/preact-compat/issues/436
const value = Array.isArray(children) ? children[0] : children;
const pitValue = Math.round(parseFloat(value) * 100) / 100;
const pitValue = Math.round(parseInt(value, 10) * 100) / 100;

return (
<div
Expand Down

0 comments on commit 6edee3e

Please sign in to comment.