« get me outta code hell

Fix skipIfCurrent causing a crash - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-08-24 18:12:15 -0300
committerFlorrie <towerofnix@gmail.com>2019-08-24 18:12:15 -0300
commitee6cde59c84ee8704239ff492d5448d61032daf2 (patch)
tree1c2e6098c0741c1b1cafdf07912f4203de226ffb
parentf0697ff06c0122e36316fd8f5d423a22634e100d (diff)
Fix skipIfCurrent causing a crash
I.e, fix a reference to the now nonexistant playNextTrack. This fixes a
crash that happens when "Play later" is selected on the currently
playing track (since doing so is meant to skip to the next song in queue
before moving the play-later'd track).
-rw-r--r--backend.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend.js b/backend.js
index b8071d1..d88c779 100644
--- a/backend.js
+++ b/backend.js
@@ -319,7 +319,7 @@ class Backend extends EventEmitter {
 
   skipIfCurrent(track) {
     if (track === this.playingTrack) {
-      this.playNextTrack(track)
+      this.playNext(track)
     }
   }