Skip to content

Commit e21f2ae

Browse files
authored
Added inline comment.
1 parent 4f5c110 commit e21f2ae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gatsby-node.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ exports.createPages = async ({graphql, boundActionCreators}) => {
124124
process.exit(1);
125125
}
126126

127+
// A leading "/" is required for redirects to work,
128+
// But multiple leading "/" will break redirects.
129+
// For more context see github.com/reactjs/reactjs.org/pull/194
127130
const toPath = slug.startsWith('/') ? slug : `/${slug}`
128131

129132
redirectToSlugMap[fromPath] = slug;

0 commit comments

Comments
 (0)