Skip to content

Commit

Permalink
Fixes the issue where getting songs in a playlist returns the wrong s…
Browse files Browse the repository at this point in the history
…ongs. References #265
  • Loading branch information
danpastori committed Jul 15, 2018
1 parent c743b8c commit 85718ca
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dist/amplitude.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/amplitude.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/amplitude.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@ let Amplitude = (function () {
let songsArray = [];

for( let i = 0; i < config.playlists[playlist].length; i++ ){
songsArray.push( config.songs[i] );
let songIndex = config.playlists[playlist][i];
songsArray.push( config.songs[songIndex] );
}

return songsArray;
Expand Down

0 comments on commit 85718ca

Please sign in to comment.