« 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.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui.js b/ui.js
index a327b98..f686ba9 100644
--- a/ui.js
+++ b/ui.js
@@ -1493,12 +1493,12 @@ class ContextMenu extends FocusElement {
   }
 
   clearItems() {
-    for (const input of this.form.inputs) {
+    const inputs = this.form.inputs.slice()
+    for (const input of inputs) {
       this.form.removeInput(input)
     }
   }
 
-
   fixLayout() {
     let width = 10
     for (const input of this.form.inputs) {