Jamming- Cannot read property 'map' of undefined

Hello

I’m having a problem with this project.
When I write a map functin to this.props.tracks I get an error “Cannot read property ‘map’ of undefined”.
tracks is defined as a prop to TrackList in searchresults.js… why is it undefined ?

Thank you

Not sure if you are still stuck on this or not, but I had a similar issue. It’s probably not that you didn’t define tracks, but that whatever function is supposed to set the values for tracks isn’t doing its job properly. So the tracks array is probably empty, which is causing the map function to freak out. Try logging tracks to the console or use the react component debugger to see what its actual value is.