Fixed an issue that would cause an empty media label to render when none were active. (#412)

This commit is contained in:
Jas Singh
2024-10-31 02:24:33 -07:00
committed by GitHub
parent da1784d486
commit 16457ad641

View File

@@ -63,7 +63,8 @@ export const generateMediaLabel = (
const mediaLabel = const mediaLabel =
truncation_size.value > 0 ? truncatedLabel.substring(0, truncation_size.value) : truncatedLabel; truncation_size.value > 0 ? truncatedLabel.substring(0, truncation_size.value) : truncatedLabel;
return mediaLabel;
return mediaLabel.length ? mediaLabel : 'Media';
} else { } else {
songIcon.value = getIconForPlayer(activePlayer.value?.identity || ''); songIcon.value = getIconForPlayer(activePlayer.value?.identity || '');
return `Media`; return `Media`;