Skip to content

Commit 0ae0e60

Browse files
longsizhuoCopilot
andauthored
Update app/docs/[...slug]/page.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ba1a857 commit 0ae0e60

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/docs/[...slug]/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ export async function generateStaticParams() {
3939
export async function generateMetadata({ params }: Param): Promise<Metadata> {
4040
const { slug } = await params;
4141
const page = source.getPage(slug);
42-
if (page == null) notFound();
42+
if (page == null) {
43+
notFound();
44+
return;
45+
}
4346

4447
return {
4548
title: page.data.title,

0 commit comments

Comments
 (0)