Skip to content

Commit

Permalink
fix(Pit): round the middle value to the whole number, resolves #2828
Browse files Browse the repository at this point in the history
  • Loading branch information
rezak-otmani committed May 22, 2018
1 parent 7f62e6d commit a0a658d
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 @@ -11,7 +11,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) * 100) / 100;

return (
<div
Expand Down

0 comments on commit a0a658d

Please sign in to comment.