From bf902387bfeec3de5f29067aa799a547458aa75c Mon Sep 17 00:00:00 2001 From: Takeshi Kondo Date: Wed, 28 Feb 2024 10:03:05 +0000 Subject: [PATCH] add error message --- src/pages/movies/list/[...paths].tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/movies/list/[...paths].tsx b/src/pages/movies/list/[...paths].tsx index a5e79bb..5dd5833 100755 --- a/src/pages/movies/list/[...paths].tsx +++ b/src/pages/movies/list/[...paths].tsx @@ -185,6 +185,7 @@ const CannotFindPage = () => { const MovieListPage: NextPage = ({ data, category }: PageProps) => { const { t } = useTranslation("@pages/movies"); + if (!data || data.length === 0) console.error("No data found for category: " + category); if (!data || data.length === 0) return ; const pageTitle = "subCategory" in category ? category.subCategory : category.category; const movieData = data.filter(isMovieData);