We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b910fe commit c8bee5bCopy full SHA for c8bee5b
src/templates/posts.js
@@ -21,7 +21,7 @@ const Posts = props => {
21
{posts.nodes.map(post => (
22
<div>
23
<Link to={post.slug}>
24
- <img src={post.featuredImage.link} alt={post.title} />
+ {post.featuredImage && <img src={post.featuredImage.link} alt={post.title} /> }
25
<h2 className="text-2xl mb-6" key={post.id}>
26
{post.title}
27
</h2>
0 commit comments