We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent feaedad commit d19a6b7Copy full SHA for d19a6b7
app/posts/[slug]/page.tsx
@@ -65,7 +65,7 @@ export default async function Page({
65
}) {
66
const { slug } = await params;
67
const post = await getPostBySlug(slug);
68
- const featuredMedia = await getFeaturedMediaById(post.featured_media);
+ const featuredMedia = post.featured_media ? await getFeaturedMediaById(post.featured_media) : null;
69
const author = await getAuthorById(post.author);
70
const date = new Date(post.date).toLocaleDateString("en-US", {
71
month: "long",
0 commit comments