Skip to content

Commit

Permalink
fix(render): don't override statusCode
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 29, 2022
1 parent c705dd4 commit f166cfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/runtime/vue/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ export default defineEventHandler(async (event) => {
}

const error = ssrContext.nuxt && ssrContext.nuxt.error
event.res.statusCode = error ? error.statusCode : 200
if (error && error.statusCode && event.res.statusCode === 200) {
event.res.statusCode = error.statusCode
}
event.res.end(data, 'utf-8')
})

Expand Down

0 comments on commit f166cfa

Please sign in to comment.