From 8dcfeb7f70b92b6798341a1881014fc78606af6e Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Tue, 20 Jan 2026 01:49:11 -0600 Subject: [PATCH] Fix undefined currentView variable in filteredTrackCount Changed currentView to activeTab in the reactive counter logic. The variable currentView doesn't exist - the correct variable is activeTab which tracks the current selected tab (albums/artists/tracks). This was causing LocalLibraryView to fail to mount/render. --- src/lib/components/views/LocalLibraryView.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/views/LocalLibraryView.svelte b/src/lib/components/views/LocalLibraryView.svelte index 0922cec1d..1537447f2 100644 --- a/src/lib/components/views/LocalLibraryView.svelte +++ b/src/lib/components/views/LocalLibraryView.svelte @@ -186,15 +186,15 @@ let filteredArtistCount = $derived(artists.length); let filteredTrackCount = $derived.by(() => { // When in tracks view with search results, use actual filtered count - if (currentView === 'tracks' && tracks.length > 0) { + if (activeTab === 'tracks' && tracks.length > 0) { return tracks.length; } // When in albums view, calculate from filtered albums - if (currentView === 'albums' && albums.length > 0) { + if (activeTab === 'albums' && albums.length > 0) { return albums.reduce((sum, album) => sum + album.track_count, 0); } // When in artists view, calculate from filtered artists - if (currentView === 'artists' && artists.length > 0) { + if (activeTab === 'artists' && artists.length > 0) { return artists.reduce((sum, artist) => sum + artist.track_count, 0); } // Fallback to stats if available