Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts committed Sep 8, 2021
1 parent 7461c7a commit f37e5f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ describe(`redirect-writer`, () => {

const warningMessage = reporterWarnMock.mock.calls[0][0]
expect(warningMessage).toMatchInlineSnapshot(`
"There are routes that match both page and redirect. It will result in page not being accessible; this is probably not intentional:
"There are routes that match both page and redirect. Pages take precendence over redirects so the redirect will not work:
- page: \\"/server-overlap\\" and redirect: \\"/server-overlap/\\" -> \\"/server-overlap/redirect/\\"
- page: \\"/client-overlap/\\" and redirect: \\"/client-overlap\\" -> \\"/client-overlap/redirect/\\""
`)
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/bootstrap/redirects-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const writeRedirects = async (): Promise<void> => {

if (redirectMatchingPageWarnings.length > 0) {
reporter.warn(
`There are routes that match both page and redirect. It will result in page not being accessible; this is probably not intentional:\n${redirectMatchingPageWarnings.join(
`There are routes that match both page and redirect. Pages take precendence over redirects so the redirect will not work:\n${redirectMatchingPageWarnings.join(
`\n`
)}`
)
Expand Down

0 comments on commit f37e5f9

Please sign in to comment.