Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amplitude.getSongsInPlaylist() is not working #230

Closed
isobolewski opened this issue Dec 30, 2017 · 1 comment
Closed

Amplitude.getSongsInPlaylist() is not working #230

isobolewski opened this issue Dec 30, 2017 · 1 comment

Comments

@isobolewski
Copy link

Environment

  • Browser: Chrome
  • Browser Version: Newest
  • Operating System: Windows 10
  • Amplitude.js Version: 3.2.3

Issue description

Amplitude.getSongsInPlaylist() results in an JS Error

Uncaught TypeError: Cannot read property 'rock' of undefined
at Object.T [as getSongsInPlaylist] (amplitude.min.js:1)

This issue can be fixed in Line 5113
Wrong:
for (var i = 0; i < _config2.default.playlist[playlist].length; i++) {

Right:
for (var i = 0; i < _config2.default.playlists[playlist].length; i++) {
--> the "s" is missing

Steps to reproduce the issue

  1. Create a Playlist in the init function
  2. Call Amplitude.getSongsInPlaylist("your-playlist-key")

What is expected?

Array of songs in a playlist

Link to where issue can be reproduced

Additional details / screenshots

@danpastori
Copy link
Contributor

Thanks @isobolewski ! I made the change and it will be merged into the next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants