Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(nuxt): allow directly rendering error page in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Nov 9, 2022
1 parent 1496d3a commit 9d52d30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nuxt/src/core/runtime/nitro/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default defineRenderHandler(async (event) => {
const ssrError = event.req.url?.startsWith('/__nuxt_error')
? getQuery(event) as Exclude<NuxtApp['payload']['error'], Error>
: null
if (ssrError && event.req.socket.readyState !== 'readOnly' /* direct request */) {
if (!process.dev && ssrError && event.req.socket.readyState !== 'readOnly' /* direct request */) {
throw createError('Cannot directly render error page!')
}

Expand Down

0 comments on commit 9d52d30

Please sign in to comment.