« get me outta code hell

Fix ordered picker - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorliam4 <towerofnix@gmail.com>2017-07-19 11:19:59 -0300
committerliam4 <towerofnix@gmail.com>2017-07-19 11:19:59 -0300
commitb39407787e36128e63cf3387c1cfd9b480af4dfa (patch)
tree19b09adc9f129da400aff1eed025e3f99ea2ea97 /src
parent9d278d956cd1503fbba597c4a84e4b032c83705f (diff)
Fix ordered picker
Diffstat (limited to 'src')
-rw-r--r--src/pickers.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pickers.js b/src/pickers.js
index 2f44630..014eee8 100644
--- a/src/pickers.js
+++ b/src/pickers.js
@@ -6,12 +6,12 @@ function makeOrderedPlaylistPicker(grouplike) {
   // Ordered playlist picker - this plays all the tracks in a group in
   // order, after flattening it.
 
-  const allSongs = flattenGrouplike(groupContents)
+  const flatGroup = flattenGrouplike(grouplike)
   let index = 0
 
   return function() {
-    if (index < allSongs.length) {
-      const picked = allSongs[index]
+    if (index < flatGroup.items.length) {
+      const picked = flatGroup.items[index]
       index++
       return picked
     } else {