Ping pong back to the right Prettier version

This commit is contained in:
Jordan Eldredge 2017-08-17 21:29:00 -07:00
parent ef5bfdab58
commit bd02f83c12
3 changed files with 9 additions and 8 deletions

View file

@ -43,8 +43,9 @@ const Position = ({
const mapStateToProps = ({ media, userInput }) => {
const position = media.length ? media.timeElapsed / media.length * 100 : 0;
const displayedPosition =
userInput.focus === "position" ? userInput.scrubPosition : position;
const displayedPosition = userInput.focus === "position"
? userInput.scrubPosition
: position;
return {
displayedPosition,

View file

@ -14,10 +14,9 @@ class Time extends React.Component {
this.props.dispatch({ type: TOGGLE_TIME_MODE });
}
render() {
const seconds =
this.props.timeMode === "ELAPSED"
? this.props.timeElapsed
: this.props.length - this.props.timeElapsed;
const seconds = this.props.timeMode === "ELAPSED"
? this.props.timeElapsed
: this.props.length - this.props.timeElapsed;
const timeObj = getTimeObj(seconds);
return (

View file

@ -178,8 +178,9 @@ export default {
this._source.connect(this._analyser);
this._source.connect(this._preamp);
this._position =
typeof position !== "undefined" ? position : this._position;
this._position = typeof position !== "undefined"
? position
: this._position;
this._startTime = this._context.currentTime - this._position;
this._source.start(0, this._position);
this._playing = true;