diff --git a/lib/application.js b/lib/application.js index f30045466..155ac8a2d 100644 --- a/lib/application.js +++ b/lib/application.js @@ -221,9 +221,10 @@ function respond (ctx) { // allow bypassing koa if (ctx.respond === false) return - if (!ctx.writable) return - const res = ctx.res + + if (!ctx.writable) return res.end() + let body = ctx.body const code = ctx.status