diff --git a/src/APlayer.js b/src/APlayer.js index 626370a..431eb40 100644 --- a/src/APlayer.js +++ b/src/APlayer.js @@ -583,12 +583,8 @@ class APlayer { } } else if (this.mode === 'circulation') { - if (this.playIndex < this.option.music.length - 1) { - this.setMusic(++this.playIndex); - } - else { - this.setMusic(0); - } + this.playIndex = (this.playIndex + 1) % this.option.music.length; + this.setMusic(this.playIndex); } } }