diff --git a/frontend/src/pages/posts/[slug].astro b/frontend/src/pages/posts/[slug].astro index 3e2a69e..63ccf3c 100644 --- a/frontend/src/pages/posts/[slug].astro +++ b/frontend/src/pages/posts/[slug].astro @@ -31,6 +31,7 @@ try { } function formatSlug(slug: string) { + if (!slug) return ''; return slug .split('-') .map(word => word.charAt(0).toUpperCase() + word.slice(1)) @@ -46,9 +47,19 @@ function formatSlug(slug: string) { Back to list {post && ( -