mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 09:33:54 +00:00
Merge pull request #2610 from binggg/patch-1
fix: ssrContext.error is not a function
This commit is contained in:
commit
809d38800a
@ -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