mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-17 00:59:29 -07:00
Check currentTrack against availableFiles length
This commit is contained in:
@@ -149,7 +149,7 @@ const playerEnded = () => {
|
||||
// next track
|
||||
currentTrack += 1;
|
||||
// roll over and re-randomize the tracks
|
||||
if (currentTrack >= playlist.availableFiles) {
|
||||
if (currentTrack >= playlist.availableFiles.length) {
|
||||
randomizePlaylist();
|
||||
currentTrack = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user