🐛 fix(music-stats): add check for empty artist and title strings

Hide component when text is not present
This commit is contained in:
2024-08-17 01:15:30 -04:00
parent 4c4fcb9f1a
commit 52948a9c74
+4
View File
@@ -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