Fix crash when there're no artists avaliable
Simple check for an out of bounds panic.
@@ -42,10 +42,12 @@ pub fn handler(key: Key, app: &mut App) {
}
Key::Enter => {
let artists = app.artists.to_owned();
+ if !artists.is_empty() {
let artist = &artists[app.artists_list_index];
app.get_artist(artist.id.clone(), artist.name.clone());
app.push_navigation_stack(RouteId::Artist, ActiveBlock::ArtistBlock);
}
+ }
Key::Char('D') => app.user_unfollow_artists(ActiveBlock::AlbumList),
Key::Char('e') => {
let artists = app.artists.to_owned();
