Skip to content

Commit

Permalink
Fix last test
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Feb 27, 2020
1 parent 9a86fec commit 85ab1f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion packages/next/next-server/server/next-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,13 @@ export default class Server {
// `getStaticPaths`
(isProduction || !staticPaths || !staticPaths.includes(urlPathname))
) {
if (!hasStaticFallback) {
if (
// In development, fall through to render to handle missing
// getStaticPaths.
(isProduction || staticPaths) &&
// When fallback isn't present, abort this render so we 404
!hasStaticFallback
) {
return false
}

Expand Down
2 changes: 1 addition & 1 deletion test/integration/prerender/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ const runTests = (dev = false, looseMode = false) => {
'/catchall-explicit/[...slug]': {
dataRoute: `/_next/data/${buildId}/catchall-explicit/[...slug].json`,
dataRouteRegex: normalizeRegEx(
`^\\/_next\\/data\\/${buildId}\\/catchall\\-explicit\\/(.+?)\\.json$`
`^\\/_next\\/data\\/${escapedBuildId}\\/catchall\\-explicit\\/(.+?)\\.json$`
),
fallback: false,
routeRegex: normalizeRegEx(
Expand Down

0 comments on commit 85ab1f6

Please sign in to comment.