Fixed index out of range issue on last song

This commit is contained in:
Anon 2023-04-20 01:11:44 -07:00
parent b5cd45e956
commit a3c6b0b3a2

View File

@ -46,10 +46,10 @@ function audioPlayer()
aListLinks[currentSong].classList.add("current-song");
const aSelected = aListLinks[currentSong].getElementsByTagName("div")[0]
aPlay.src = musicList[idx][0]
aTrack.innerHTML = musicList[idx][1]
aArtist.innerHTML = musicList[idx][2]
aCoverArt.src = musicList[idx][4]
aPlay.src = musicList[currentSong][0]
aTrack.innerHTML = musicList[currentSong][1]
aArtist.innerHTML = musicList[currentSong][2]
aCoverArt.src = musicList[currentSong][4]
if (doplay === true)
{
aPlay.play()