« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ui.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/ui.js b/ui.js
index b055990..41fcf74 100644
--- a/ui.js
+++ b/ui.js
@@ -834,11 +834,8 @@ class GrouplikeListingElement extends Form {
     }
 
     if (this.grouplike.items.length) {
-      const itemElements = this.grouplike.items.map(item => {
-        return new InteractiveGrouplikeItemElement(item, this.recordStore)
-      })
-
-      for (const itemElement of itemElements) {
+      for (const item of this.grouplike.items) {
+        const itemElement = new InteractiveGrouplikeItemElement(item, this.recordStore)
         for (const evtName of ['download', 'remove', 'mark', 'paste', 'browse', 'queue', 'unqueue', 'menu']) {
           itemElement.on(evtName, (...data) => this.emit(evtName, itemElement.item, ...data))
         }