style: remove useless comment

This commit is contained in:
DevAndromeda 2021-08-29 11:37:11 +05:45
parent 1e27291b9e
commit aff198a8a8
No known key found for this signature in database
GPG key ID: FA40E3EC5CB6DCD6

View file

@ -493,14 +493,10 @@ class Queue<T = unknown> {
*/
jump(track: Track | number): void {
if (this.#watchDestroyed()) return;
// remove the track if exists
const foundTrack = this.remove(track);
if (!foundTrack) throw new PlayerError("Track not found", ErrorStatusCode.TRACK_NOT_FOUND);
// since we removed the existing track from the queue,
// we now have to place that to position 1
// because we want to jump to that track
// this will skip current track and play the next one which will be the foundTrack
this.tracks.splice(0, 0, foundTrack);
this.tracks.splice(0, 0, foundTrack);
return void this.skip();
}