Merge pull request #684 from joshuayuen99/jump-fix

fix(Queue): fix jump
This commit is contained in:
Andromeda 2021-08-11 11:11:17 +05:45 committed by GitHub
commit 7a58cf8fb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -503,7 +503,7 @@ class Queue<T = unknown> {
if (this.#watchDestroyed()) return; if (this.#watchDestroyed()) return;
const foundTrack = this.remove(track); const foundTrack = this.remove(track);
if (!foundTrack) throw new PlayerError("Track not found", ErrorStatusCode.TRACK_NOT_FOUND); if (!foundTrack) throw new PlayerError("Track not found", ErrorStatusCode.TRACK_NOT_FOUND);
this.tracks.splice(1, 0, foundTrack); this.tracks.splice(0, 0, foundTrack);
return void this.skip(); return void this.skip();
} }