From da90ccde346209d1e1d6e2e1057540e3ad1e0aeb Mon Sep 17 00:00:00 2001 From: Bui Date: Sun, 6 Mar 2022 16:13:07 +0000 Subject: [PATCH] fix if p2 closed song --- public/src/js/songselect.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/src/js/songselect.js b/public/src/js/songselect.js index d74e823..4c94bad 100644 --- a/public/src/js/songselect.js +++ b/public/src/js/songselect.js @@ -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 }) }