fix if p2 closed song

This commit is contained in:
Bui 2022-03-06 16:13:07 +00:00
parent e90fdd87b5
commit da90ccde34

View File

@ -786,7 +786,8 @@ class SongSelect{
this.state.selLock = true
p2.send("songsel", {
song: this.selectedSong,
selected: true
selected: true,
fromRandom: this.lastRandom
})
}
}
@ -846,8 +847,7 @@ class SongSelect{
if(!this.state.selLock){
this.state.selLock = true
p2.send("songsel", {
song: this.lastRandom ? this.songs.findIndex(song => song.action === "random") : this.selectedSong,
fromRandom: this.lastRandom
song: this.lastRandom ? this.songs.findIndex(song => song.action === "random") : this.selectedSong
})
}