-
Notifications
You must be signed in to change notification settings - Fork 27.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix data route ordering in dev (#54364)
Previously we were appending the data routes to the dynamic routes array which didn't ensure the data routes come before the normal dynamic routes allowing a catch-all to override the data route. Fixes: #53887
- Loading branch information
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
test/integration/dynamic-routing/pages/[name]/[comment]/[...rest].js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// this checks priority issues with catch-all routes that | ||
// can match `_next/data/build-id/path.json | ||
|
||
export function getServerSideProps() { | ||
return { | ||
notFound: true, | ||
} | ||
} | ||
|
||
export default function Page() { | ||
return <p>nested catch-all</p> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters