Skip to content

Commit

Permalink
redirect before 404
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Oct 10, 2024
1 parent 1647744 commit dd2e85b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const Page = async ({params}: PageProps) => {

const {redirect: redirectPath, entity} = await getEntityFromPath<NodeUnion>(path)

if (!entity) notFound()
if (redirectPath) redirect(redirectPath)
if (!entity) notFound()

if (entity.__typename === "NodeSupBook") {
if (page === "excerpt") return <SupBookExcerptPage node={entity} />
Expand Down

0 comments on commit dd2e85b

Please sign in to comment.