Merge pull request #2610 from binggg/patch-1

fix: ssrContext.error is not a function
This commit is contained in:
Sébastien Chopin 2018-01-16 12:09:05 +01:00 committed by GitHub
commit 809d38800a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,7 @@ export default async ssrContext => {
midd = midd.map((name) => {
if (typeof name === 'function') return name
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]
})