diff --git a/gatsby-node.js b/gatsby-node.js index 607d2c7..cc4463e 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -36,8 +36,8 @@ exports.createPages = ({ graphql, boundActionCreators }) => { const posts = result.data.allMarkdownRemark.edges; _.each(posts, (post, index) => { - const previous = index === posts.length - 1 ? false : posts[index + 1].node; - const next = index === 0 ? false : posts[index - 1].node; + const previous = index === posts.length - 1 ? null : posts[index + 1].node; + const next = index === 0 ? null : posts[index - 1].node; createPage({ path: post.node.fields.slug,