Fix 'undefined' in window title when song has no artist name (#402)

This commit is contained in:
mcneb10
2023-12-05 21:05:08 -06:00
committed by GitHub
parent 3f9cdab450
commit a8814d3e8a
+3 -1
View File
@@ -222,7 +222,9 @@ export const WindowBar = () => {
const statusString = playerStatus === PlayerStatus.PAUSED ? '(Paused) ' : '';
const queueString = length ? `(${index + 1} / ${length}) ` : '';
const title = length
? `${statusString}${queueString}${currentSong?.name}${currentSong?.artistName}`
? currentSong?.artistName
? `${statusString}${queueString}${currentSong?.name}${currentSong?.artistName}`
: `${statusString}${queueString}${currentSong?.name}`
: 'Feishin';
document.title = title;