diff --git a/src/stores/shows.ts b/src/stores/shows.ts index 498a2a57e3df5330231a127c6f517693dfe5388b..ba32d7823c61ebcfd84a6087279878f52cf2421d 100644 --- a/src/stores/shows.ts +++ b/src/stores/shows.ts @@ -113,18 +113,10 @@ function useRouteSyncBehaviour( if (!oldShow) return const newShowId = show?.id ?? null const oldShowId = oldShow?.id ?? null - if (newShowId === oldShowId && newShowId === null) return + if (newShowId === oldShowId) return if (show && route.name && route.params.showId) { - if (Object.values(route.params).length === 1) { - // The route only contains the showId, so we can safely navigate to the same route - // but with a different show. - void router.replace({ name: route.name, params: { ...route.params, showId: newShowId } }) - } else { - // This route contains other parameters that may depend on the currently selected show. - // Navigate to the default show detail page instead. - void router.push({ name: 'show', params: { showId: newShowId } }) - } + void router.replace({ name: route.name, params: { ...route.params, showId: newShowId } }) } })