fix: "'article' is possibly 'null'."

This commit is contained in:
robin committed 2026-08-04 15:32:45 +02:00
1 parent 18f8496af9
commit fd4da2a43f
1 file changed
+4
+4
View File
@@ -18,6 +18,10 @@ export default async function Page({ params }: PageProps) {
const { slug } = await params; const { slug } = await params;
const article = await getWikiPageBySlug(slug); const article = await getWikiPageBySlug(slug);
if (!article) {
notFound();
}
return ( return (
<article className="prose prose-invert max-w-none p-6"> <article className="prose prose-invert max-w-none p-6">
<h1>{article.title}</h1> <h1>{article.title}</h1>