mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
chore(nuxt): add type for headers (#8326)
This commit is contained in:
parent
654ddd412a
commit
3333ef8dae
@ -45,9 +45,11 @@ export default <NitroErrorHandler> async function errorhandler (error: H3Error,
|
||||
|
||||
// HTML response (via SSR)
|
||||
const isErrorPage = event.req.url?.startsWith('/__nuxt_error')
|
||||
let html = !isErrorPage ? await $fetch(withQuery('/__nuxt_error', errorObject), {
|
||||
headers: event.req.headers,
|
||||
}).catch(() => null) : null
|
||||
let html = !isErrorPage
|
||||
? await $fetch(withQuery('/__nuxt_error', errorObject), {
|
||||
headers: event.req.headers as HeadersInit
|
||||
}).catch(() => null)
|
||||
: null
|
||||
|
||||
// Fallback to static rendered error page
|
||||
if (!html) {
|
||||
|
Loading…
Reference in New Issue
Block a user