koa 2.15.4 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/application.js +3 -2
- package/package.json +1 -1
package/lib/application.js
CHANGED
|
@@ -257,9 +257,10 @@ function respond(ctx) {
|
|
|
257
257
|
// allow bypassing koa
|
|
258
258
|
if (false === ctx.respond) return;
|
|
259
259
|
|
|
260
|
-
if (!ctx.writable) return;
|
|
261
|
-
|
|
262
260
|
const res = ctx.res;
|
|
261
|
+
|
|
262
|
+
if (!ctx.writable) return res.end();
|
|
263
|
+
|
|
263
264
|
let body = ctx.body;
|
|
264
265
|
const code = ctx.status;
|
|
265
266
|
|