mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +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)
|
// HTML response (via SSR)
|
||||||
const isErrorPage = event.req.url?.startsWith('/__nuxt_error')
|
const isErrorPage = event.req.url?.startsWith('/__nuxt_error')
|
||||||
let html = !isErrorPage ? await $fetch(withQuery('/__nuxt_error', errorObject), {
|
let html = !isErrorPage
|
||||||
headers: event.req.headers,
|
? await $fetch(withQuery('/__nuxt_error', errorObject), {
|
||||||
}).catch(() => null) : null
|
headers: event.req.headers as HeadersInit
|
||||||
|
}).catch(() => null)
|
||||||
|
: null
|
||||||
|
|
||||||
// Fallback to static rendered error page
|
// Fallback to static rendered error page
|
||||||
if (!html) {
|
if (!html) {
|
||||||
|
Loading…
Reference in New Issue
Block a user