diff --git a/index.html b/index.html
index 32c22fbe..2717b38a 100644
--- a/index.html
+++ b/index.html
@@ -38,7 +38,7 @@
-
+
{props.children};
- return {props.children};
+ if (normalRouter)
+ return (
+
+ {props.children}
+
+ );
+ return (
+
+ {props.children}
+
+ );
}
// Checks if the extension is installed
diff --git a/src/pages/discover/hooks/useDiscoverMedia.ts b/src/pages/discover/hooks/useDiscoverMedia.ts
index ea4e719d..1419c3ad 100644
--- a/src/pages/discover/hooks/useDiscoverMedia.ts
+++ b/src/pages/discover/hooks/useDiscoverMedia.ts
@@ -184,6 +184,11 @@ export function useDiscoverMedia({
// Race between the Trakt request and timeout
const response = await Promise.race([traktFunction(), timeoutPromise]);
+ // Check if response is null
+ if (!response) {
+ throw new Error("Trakt API returned null response");
+ }
+
// Paginate the results
const pageSize = isCarouselView ? 20 : 100; // Limit to 20 items for carousels, get more for detailed views
const { tmdb_ids: tmdbIds, hasMore: hasMoreResults } = paginateResults(
@@ -317,6 +322,15 @@ export function useDiscoverMedia({
}, [mediaType, formattedLanguage, isCarouselView]);
const fetchMedia = useCallback(async () => {
+ // Skip fetching recommendations if no ID is provided
+ if (contentType === "recommendations" && !id) {
+ setIsLoading(false);
+ setMedia([]);
+ setHasMore(false);
+ setSectionTitle("");
+ return;
+ }
+
setIsLoading(true);
setError(null);
diff --git a/src/pages/parts/home/HeroPart.tsx b/src/pages/parts/home/HeroPart.tsx
index 6f967d00..f2acd709 100644
--- a/src/pages/parts/home/HeroPart.tsx
+++ b/src/pages/parts/home/HeroPart.tsx
@@ -94,6 +94,7 @@ export function HeroPart({
paddingTop: `${topOffset}px`,
}}
onFixedToggle={stickStateChanged}
+ scrollElement="window"
>