« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui.js b/ui.js
index 049930b..e29fb2c 100644
--- a/ui.js
+++ b/ui.js
@@ -1153,6 +1153,12 @@ class GrouplikeListingElement extends Form {
   }
 
   keyPressed(keyBuf) {
+    // Just about everything here depends on the grouplike existing, so let's
+    // not continue if it doesn't!
+    if (!this.grouplike) {
+      return
+    }
+
     if (telc.isBackspace(keyBuf)) {
       this.loadParentGrouplike()
     } else if (telc.isCharacter(keyBuf, '/') || keyBuf[0] === 6) { // '/', ctrl-F