bugfix: handle playlist with no tracks

This commit is contained in:
Kendall Garner 2025-10-11 12:39:59 -07:00
parent 7817059a9e
commit fccbf83c12
No known key found for this signature in database
GPG key ID: 9355F387FE765C94

View file

@ -186,7 +186,10 @@ const PlaylistDetailSongListRoute = () => {
}
}, [playlistSongs.data?.items, page?.table.id, playlistId]);
const itemCount = playlistSongs.data?.totalRecordCount ? filterSortedSongs.length : undefined;
const itemCount =
typeof playlistSongs.data?.totalRecordCount === 'number'
? filterSortedSongs.length
: undefined;
const handlePlay = (play: Play) => {
handlePlayQueueAdd?.({