diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro index 5271ade..6c4ec0c 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -26,7 +26,7 @@ const slug = Astro.params.slug; const author = Array.isArray(entry.data.author) ? entry.data.author : (entry.data.author !== undefined ? [entry.data.author] : [{collection: 'authors', id: siteConfig.defaultAuthor.id}]); // Get author data -const authorData = await Promise.all((author).map((singleAuthor) => getEntry(singleAuthor).then(authorEntry => authorEntry.data))) +const authorData = await Promise.all((author).map((singleAuthor) => getEntry(singleAuthor).then(authorEntry => authorEntry?.data))) const authorInfo = authorData.includes(undefined) ? [{data: siteConfig.defaultAuthor}] : authorData; // get featured image and use it as og:image