Skip to content

Commit

Permalink
fix(FEC-9433): timer on seek preview displayed as NaN:NaN:NaN (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyBregman committed Nov 21, 2019
1 parent 5010590 commit df3aeba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/seekbar/seekbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ class SeekBar extends Component {
* @memberof SeekBar
*/
getTime(e: any): number {
let xPosition = e.clientX || (e.changedTouches && e.changedTouches[0] && e.changedTouches[0].clientX);
let xPosition = typeof e.clientX === 'number' ? e.clientX : e.changedTouches && e.changedTouches[0] && e.changedTouches[0].clientX;
let time =
this.props.duration *
((xPosition - this._seekBarElement.offsetLeft - this.getOffset(this.props.playerElement).left) / this._seekBarElement.clientWidth);
Expand Down

0 comments on commit df3aeba

Please sign in to comment.