The variable selectedPlaylistName in the Playlists object's internal state defaults to an empty string. This is problematic because it only updates when a user selects a playlist, but if they click the first then it searches for a playlist with an empty name. I added a quick hard-coded solution for the time being. Need to explore a better alternative though.
const selectedPlaylistName = (this.state.selectedPlaylistName === '') ? 'Summer 2019' : this.state.selectedPlaylistName;
The variable
selectedPlaylistNamein the Playlists object's internal state defaults to an empty string. This is problematic because it only updates when a user selects a playlist, but if they click the first then it searches for a playlist with an empty name. I added a quick hard-coded solution for the time being. Need to explore a better alternative though.