Fix error in rendering an artist with empty bio

Includes a refactor for a helper to test for play count
This commit is contained in:
Claudio Ortolina
2024-12-03 22:26:41 +00:00
parent bef38967a1
commit 2c055acad6
4 changed files with 21 additions and 12 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ defmodule LastFm.Artist do
%__MODULE__{
musicbrainz_id: api_response["mbid"],
name: api_response["name"],
bio: api_response["bio"]["content"],
bio: api_response["bio"]["content"] || "",
image: get_image(api_response),
play_count: get_play_count(api_response)
}