Skip to content

Commit

Permalink
fix: fix locale data route regex
Browse files Browse the repository at this point in the history
  • Loading branch information
wyattjoh committed Sep 7, 2023
1 parent a8f300d commit 32025fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/next/src/server/lib/router-utils/filesystem.ts
Expand Up @@ -249,7 +249,7 @@ export async function setupFsCheck(opts: {
? new RegExp(
route.dataRouteRegex.replace(
`/${escapedBuildId}/`,
`/${escapedBuildId}/(?<nextLocale>.+?)/`
`/${escapedBuildId}/(?<nextLocale>[^/]+?)/`
)
)
: new RegExp(route.dataRouteRegex),
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/server/lib/router-utils/setup-dev.ts
Expand Up @@ -1784,7 +1784,7 @@ async function startWatcher(opts: SetupOpts) {
? new RegExp(
route.dataRouteRegex.replace(
`/development/`,
`/development/(?<nextLocale>.+?)/`
`/development/(?<nextLocale>[^/]+?)/`
)
)
: new RegExp(route.dataRouteRegex),
Expand Down

0 comments on commit 32025fc

Please sign in to comment.