Skip to content

Commit

Permalink
fix post.js
Browse files Browse the repository at this point in the history
  • Loading branch information
smetzdev committed May 6, 2021
1 parent 82ddc5c commit 43d74e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/templates/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ const IndexPage = ({ data }) => {
return (
<Layout>
<Seo title="Home" />
<GatsbyImage image={featuredImage.childImageSharp.gatsbyImageData} />
{featuredImage && (
<GatsbyImage image={featuredImage.childImageSharp.gatsbyImageData} />
)}
<h1>{data.wpPost.title}</h1>
<section dangerouslySetInnerHTML={{ __html: data.wpPost.content }} />
</Layout>
Expand Down

0 comments on commit 43d74e2

Please sign in to comment.