Skip to content

Commit

Permalink
fix: netlify build error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
noa.santo committed Jan 15, 2024
1 parent e3cb98a commit 6bd03ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/templates/blog-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ export const Head = ({
const { author, seoMetaText, title, publicationDate, heroImage } =
data.contentfulBlogPost;

const shareImagePath = heroImage.shareImage.resize.src;
let shareImagePath = '';
if (heroImage && heroImage.shareImage && heroImage.shareImage.resize) {
shareImagePath = heroImage.shareImage.resize.src;
}

/*
* SEO Notes:
Expand Down

0 comments on commit 6bd03ba

Please sign in to comment.