Browse Source

Added inline comment.

main
Brian Vaughn 7 years ago
committed by GitHub
parent
commit
e21f2ae943
  1. 3
      gatsby-node.js

3
gatsby-node.js

@ -124,6 +124,9 @@ exports.createPages = async ({graphql, boundActionCreators}) => {
process.exit(1);
}
// A leading "/" is required for redirects to work,
// But multiple leading "/" will break redirects.
// For more context see github.com/reactjs/reactjs.org/pull/194
const toPath = slug.startsWith('/') ? slug : `/${slug}`
redirectToSlugMap[fromPath] = slug;

Loading…
Cancel
Save