From af2745088ee8bcc1565c4126951b5dd6f07a88f5 Mon Sep 17 00:00:00 2001 From: runarvestmann Date: Tue, 3 Dec 2024 15:50:46 +0000 Subject: [PATCH] In case no organization page is found we still want to potentially render a frontpage --- apps/web/pages/s/[...slugs]/index.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/web/pages/s/[...slugs]/index.tsx b/apps/web/pages/s/[...slugs]/index.tsx index 9b72d7cda505..9eca5605ac4c 100644 --- a/apps/web/pages/s/[...slugs]/index.tsx +++ b/apps/web/pages/s/[...slugs]/index.tsx @@ -181,6 +181,14 @@ Component.getProps = async (context) => { }) if (!organizationPage) { + if (slugs.length === 1) { + return { + page: { + type: PageType.FRONTPAGE, + props: await Home.getProps(context), + }, + } + } throw new CustomNextError(404, 'Organization page was not found') }