Skip to content

Commit

Permalink
Prevent double load bug in strict mode
Browse files Browse the repository at this point in the history
Fixes #1439
Closes #1450
  • Loading branch information
cookpete committed May 7, 2022
1 parent 9924137 commit d053d4a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export default class Player extends Component {
}

handlePlayerMount = player => {
if (this.player) return // Prevent loading twice in strict mode
this.player = player
this.player.load(this.props.url)
this.progress()
Expand Down

0 comments on commit d053d4a

Please sign in to comment.