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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;