🐛 fix(music-stats): add check for empty artist and title strings
Hide component when text is not present
This commit is contained in:
@@ -221,6 +221,10 @@ function M.get_icon_with_text()
|
||||
-- Apply the simplification methods
|
||||
title = simplify_text(title)
|
||||
artist = simplify_text(artist)
|
||||
-- if title/artist are empty, return empty string
|
||||
if title == "" and artist == "" then
|
||||
return ""
|
||||
end
|
||||
|
||||
return format_icon_with_text(icon, artist, title)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user