Skip to content

Commit

Permalink
fix(web): In case no organization page is found we still want to pote…
Browse files Browse the repository at this point in the history
…ntially render a frontpage (#17116)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
RunarVestmann and kodiakhq[bot] authored Dec 4, 2024
1 parent 0b31a03 commit f79ff76
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/web/pages/s/[...slugs]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}

Expand Down

0 comments on commit f79ff76

Please sign in to comment.