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 bf40197 commit d3a6df8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/templates/blog-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +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:
* Recommended meta description length these days is 120 - 158 characters. The lower number is relevant for mobile devices.
Expand Down

0 comments on commit d3a6df8

Please sign in to comment.