Skip to content

Commit

Permalink
add check before setting query
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Feb 16, 2022
1 parent 875aedb commit 689a4de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/next/server/base-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,9 @@ export default abstract class Server {
res.body('{"notFound":true}').send()
return null
} else {
query.__nextNotFoundSrcPage = pathname
if (this.renderOpts.dev) {
query.__nextNotFoundSrcPage = pathname
}
await this.render404(
req,
res,
Expand Down

0 comments on commit 689a4de

Please sign in to comment.