Skip to content

Commit

Permalink
fix: slider screenreader value returning as NaN (#6404)
Browse files Browse the repository at this point in the history
Slider's getProgress was return a string when it should've been returning a number.

Fixes #5984.
  • Loading branch information
brandonocasey authored and gkatsev committed Jan 15, 2020
1 parent bcaa869 commit 7008777
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/slider/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class Slider extends Component {
const progress = this.getProgress();

if (progress === this.progress_) {
return;
return progress;
}

this.progress_ = progress;
Expand All @@ -268,7 +268,7 @@ class Slider extends Component {
* percentage filled that the slider is
*/
getProgress() {
return clamp(this.getPercent(), 0, 1).toFixed(4);
return Number(clamp(this.getPercent(), 0, 1).toFixed(4));
}

/**
Expand Down

0 comments on commit 7008777

Please sign in to comment.