Fixed: Unknown series slug redirecting back to home instad of error screen

This commit is contained in:
Mark McDowall 2025-03-08 13:12:12 -08:00
parent 8acd154206
commit 608fc29086
2 changed files with 5 additions and 6 deletions

View file

@ -75,11 +75,6 @@ function ImportSeriesRow({ id }: ImportSeriesRowProps) {
[selectDispatch]
);
console.info(
'\x1b[36m[MarkTest] is selected\x1b[0m',
selectState.selectedState[id]
);
return (
<>
<VirtualTableSelectCell

View file

@ -19,7 +19,11 @@ function SeriesDetailsPage() {
const previousIndex = usePrevious(seriesIndex);
useEffect(() => {
if (seriesIndex === -1 && previousIndex !== -1) {
if (
seriesIndex === -1 &&
previousIndex !== -1 &&
previousIndex !== undefined
) {
history.push(`${window.Sonarr.urlBase}/`);
}
}, [seriesIndex, previousIndex, history]);