Skip empty search results when navigating back from artist detail page
This commit is contained in:
parent
b3d3c017ed
commit
c461f0071d
1 changed files with 9 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue