From fccbf83c12d897e8b10426e2d5b9e9a338be766b Mon Sep 17 00:00:00 2001 From: Kendall Garner <17521368+kgarner7@users.noreply.github.com> Date: Sat, 11 Oct 2025 12:39:59 -0700 Subject: [PATCH] bugfix: handle playlist with no tracks --- .../playlists/routes/playlist-detail-song-list-route.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/renderer/features/playlists/routes/playlist-detail-song-list-route.tsx b/src/renderer/features/playlists/routes/playlist-detail-song-list-route.tsx index e7d98602..5bb8d267 100644 --- a/src/renderer/features/playlists/routes/playlist-detail-song-list-route.tsx +++ b/src/renderer/features/playlists/routes/playlist-detail-song-list-route.tsx @@ -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?.({