Skip to content

Commit a80d2b0

Browse files
authored
Merge pull request #59 from talensjr/master
Changed the includes of 404 pages by a regexp test
2 parents b5d3844 + 786852d commit a80d2b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/gatsby-node.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ exports.onCreatePage = async ({ page, actions }, pluginOptions) => {
8484

8585
languages.forEach(language => {
8686
const localePage = generatePage(true, language)
87-
if (localePage.path.includes(`/404/`)) {
87+
const regexp = new RegExp("/404/?$")
88+
if (regexp.test(localePage.path)) {
8889
localePage.matchPath = `/${language}/*`
8990
}
9091
createPage(localePage)

0 commit comments

Comments
 (0)