Skip to content

Commit a59218d

Browse files
adjust where date is pulled from
1 parent f17d5db commit a59218d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ export default async function Page() {
5959
typeof post.author === "string" ? post.author : post.author.id
6060
return x.id === authorId
6161
})
62-
const publishedDate = new Date(
63-
post.publishedAt ?? post.createdAt ?? new Date()
64-
)
62+
const publishedDate = post.publishedAt
63+
? new Date(post.publishedAt)
64+
: undefined
6565
return {
6666
name: post.title,
6767
body: post.description,

0 commit comments

Comments
 (0)