Skip to content

Commit

Permalink
fix zeroth index for queue
Browse files Browse the repository at this point in the history
  • Loading branch information
afkcodes committed Aug 1, 2024
1 parent 90808c0 commit a804cf8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "audio_x",
"version": "1.0.10-beta.8",
"version": "1.0.10-beta.10",
"description": "The audio player for the gen-x",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ class AudioX {
playPrevious() {
const index = this._currentQueueIndex - 1;

if (index > 0) {
if (index >= 0) {
const previousTrack = this._queue[index];
this.addMediaAndPlay(previousTrack, this._fetchFn);
this._currentQueueIndex = index;
Expand Down

0 comments on commit a804cf8

Please sign in to comment.