From 2b67ea9635242ee66011692388c7e01dbd911888 Mon Sep 17 00:00:00 2001 From: Harsh Singh <51085015+harshsinghatz@users.noreply.github.com> Date: Tue, 6 Dec 2022 20:34:34 +0530 Subject: [PATCH] Harsh/fix 404 page for undefined events (#5700) * fix: 404 page for undefined events * Update apps/web/pages/[user]/[type].tsx Co-authored-by: Hariom Balhara Co-authored-by: Guest Co-authored-by: Alex van Andel Co-authored-by: Hariom Balhara --- apps/web/pages/[user]/[type].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/pages/[user]/[type].tsx b/apps/web/pages/[user]/[type].tsx index 9e4c350b3f..162b66ee93 100644 --- a/apps/web/pages/[user]/[type].tsx +++ b/apps/web/pages/[user]/[type].tsx @@ -121,7 +121,7 @@ async function getUserPageProps(context: GetStaticPropsContext) { "strikethrough", ]); - if (!user || !user.eventTypes) return { notFound: true }; + if (!user || !user.eventTypes.length) return { notFound: true }; const [eventType]: (typeof user.eventTypes[number] & { users: Pick[];