Closed jacobgreen25 closed 9 years ago
I was just told by a friend that iPhone 4 doesn't support promises and that's why the error is occurring.
@scotty914 If you still want to use Promises, have a look at the Usage section where there are links to some of these libraries. Otherwise you can always use callbacks. In your case, your code would become
spotifyApi.getUserPlaylists($scope.user.id, function(err, data) {
if (err) {
console.log(err);
ga('send','event','error','spotifyLoadFailed');
}
});
Hi,
I'm using the Spotify Web API to do the following function call.
spotifyApi.getUserPlaylists($scope.user.id) .then(function(data) { (err) { console.error(err); ga('send','event','error','spotifyLoadFailed'); });
And getting the following error. Error: 'null' is not an object (evaluating 'spotifyApi.getUserPlaylists($scope.user.id) .then')
It works on iPhone 5, 6 and all Android devices I've tested, yet, iPhone 4 says the data object returned is null.