Skip to content

Commit

Permalink
upadte: 修复单曲循环设置无法更改状态问题
Browse files Browse the repository at this point in the history
  • Loading branch information
hijiangtao committed Apr 21, 2019
1 parent 9a10668 commit 7dbbb84
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ class App extends Component {
});
}

onLoopChange = (event) => {
this.setState({
musicLoopFlag: event.target.value,
onLoopChange = () => {
this.setState((prevState) => {
return {
...prevState,
musicLoopFlag: !prevState.musicLoopFlag,
}
})
}

Expand Down

0 comments on commit 7dbbb84

Please sign in to comment.