mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
fix: ssrContext.error is not a function
This commit is contained in:
parent
3a36c0f2c5
commit
a67ae8672b
@ -110,7 +110,7 @@ export default async ssrContext => {
|
|||||||
midd = midd.map((name) => {
|
midd = midd.map((name) => {
|
||||||
if (typeof name === 'function') return name
|
if (typeof name === 'function') return name
|
||||||
if (typeof middleware[name] !== 'function') {
|
if (typeof middleware[name] !== 'function') {
|
||||||
ssrContext.error({ statusCode: 500, message: 'Unknown middleware ' + name })
|
app.context.error({ statusCode: 500, message: 'Unknown middleware ' + name })
|
||||||
}
|
}
|
||||||
return middleware[name]
|
return middleware[name]
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user