Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
fix: fix crash if social is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSnow committed Sep 5, 2023
1 parent c25bf77 commit fecc8c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/karbon/src/runtime/composables/article-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function getDefineArticle(pageMeta: PageMeta, site: ReturnType<typeof useSite>)
const url = hasAuthorPage
? resolveURL(siteUrl, urls.author.toURL(author, urls.author._context ?? invalidContext))
: undefined
const socials = Object.values(author.socials as Record<string, string>).map((url) => withHttps(url))
const socials = Object.values((author.socials ?? {}) as Record<string, string>).map((url) => withHttps(url))

return definePerson({
familyName: last_name,
Expand Down

0 comments on commit fecc8c7

Please sign in to comment.