Fixed index out of range issue on last song
This commit is contained in:
parent
b5cd45e956
commit
a3c6b0b3a2
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user