Skip to content

Commit

Permalink
fix: remove last playing audio throw error #123
Browse files Browse the repository at this point in the history
  • Loading branch information
lijinke666 committed Jul 2, 2020
1 parent 82bf85f commit 355f2e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

Expand Down
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,9 @@ export default class ReactJkMusicPlayer extends PureComponent {
}

onProgressChange = (value) => {
this.audio.currentTime = value
if (this.audio) {
this.audio.currentTime = value
}
}

//进度条跳跃
Expand Down

0 comments on commit 355f2e1

Please sign in to comment.