Skip to content

Commit

Permalink
fix(play): undefined when stop command is called in loop mode (eritis…
Browse files Browse the repository at this point in the history
  • Loading branch information
sugiish authored Jan 27, 2022
1 parent 5e4b229 commit ace3483
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/play.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = {

queue.connection.removeAllListeners("disconnect");

if (queue.loop) {
if (queue.loop && queue.songs.length > 0) {
// if loop is on, push the song back at the end of the queue
// so it can repeat endlessly
let lastSong = queue.songs.shift();
Expand Down

0 comments on commit ace3483

Please sign in to comment.