spotify-web-api-node icon indicating copy to clipboard operation
spotify-web-api-node copied to clipboard

trackIds.join is not a function - containsMySavedTracks

Open Noelg14 opened this issue 3 years ago • 1 comments

When calling the function containsMySavedTracks I am getting the following Exception:

(node:8748) UnhandledPromiseRejectionWarning: TypeError: trackIds.join is not a function
    at SpotifyWebApi.containsMySavedTracks (\node_modules\spotify-web-api-node\src\spotify-web-api.js:804:23) 

This function called using the track URI

//@param song is track uri from getCurrentTrack
//
function isLiked(song){
  spotifyApi.containsMySavedTracks(song)
  .then(result =>{
     console.log(result)
     return result;
  }) .catch(err =>{
    console.log(err)
  })
}

Noelg14 avatar Feb 04 '22 07:02 Noelg14

argument of containsMySavedTracks should be an array

phts avatar Feb 13 '24 21:02 phts