Skip to content

Commit

Permalink
Fix rounding errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcconechy committed Sep 4, 2024
1 parent d5b643b commit 6cffa94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ids-slider/ids-slider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ export default class IdsSlider extends Base {
break;
}
}
const tooltipValue = this.type === 'step' && containsDecimals ? String(Number(value)) : String(Math.ceil(Number(value)));
const tooltipValue = this.type === 'step' && containsDecimals ? String(Number(value).toFixed(2)) : String(Number(value).toFixed(0));
if (tooltipText) tooltipText.innerHTML = tooltipValue;

if (this.type !== 'step') {
Expand Down

0 comments on commit 6cffa94

Please sign in to comment.