diff options
author | Florrie <towerofnix@gmail.com> | 2018-12-15 01:41:00 -0400 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-12-15 01:41:00 -0400 |
commit | 12875f1d68a6988bbec5b08b0f638e82c8100b93 (patch) | |
tree | cdf54dc0c37d9d0670ee6015d77a449e0270c83c | |
parent | 9a4f04fbd3233fe2711b2cf5d11c4baa46e78b89 (diff) |
Get rid of unnecessary map() call
This doesn't impact performance noticeably, it's just a code nitpick.
-rw-r--r-- | ui.js | 7 |
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)) } |