From c461f0071d9a9f2065c8718569e0eb67cec68627 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Sat, 11 Apr 2026 13:54:23 -0700 Subject: [PATCH] Skip empty search results when navigating back from artist detail page --- webui/static/script.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/webui/static/script.js b/webui/static/script.js index 32806aae..18bb0320 100644 --- a/webui/static/script.js +++ b/webui/static/script.js @@ -34383,7 +34383,15 @@ function initializeArtistsPage() { } if (detailBackButton) { - detailBackButton.addEventListener('click', () => showArtistsResultsState()); + detailBackButton.addEventListener('click', () => { + // If there are no search results (user navigated directly to artist), + // go straight to the main search view instead of showing an empty results page + if (!artistsPageState.searchResults || artistsPageState.searchResults.length === 0) { + showArtistsSearchState(); + } else { + showArtistsResultsState(); + } + }); } // Initialize tabs (only need to do this once)