react-spotify-player
react-spotify-player copied to clipboard
Can't find the data items
When i try to run the code i get the following error: "TypeError: Cannot read property 'item' of undefined"
It's about this piece of code:
success: data => { this.setState({ item: data.item, is_playing: data.is_playing, progress_ms: data.progress_ms });
So all the steps are working perfect. I get the autentication screen from spotify, and the moment i click accept i get this error and i can't seem to find the solution for it.
You need to be listening to something on your Spotify account so that this error does not occur. I will be sending an update.
Confirmed that this is indeed the issue - does someone want to put in better error handling incase you are not listening to music?
Same error but i don't know how to fix it.
I sent a pull request! #12