From a67ae8672b69ae5da74470e958d195d1c5a2b02f Mon Sep 17 00:00:00 2001 From: Ben Zhao Date: Tue, 16 Jan 2018 19:01:03 +0800 Subject: [PATCH] fix: ssrContext.error is not a function --- lib/app/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/app/server.js b/lib/app/server.js index b238d3bbd3..1f7489a8de 100644 --- a/lib/app/server.js +++ b/lib/app/server.js @@ -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] })