koa 3.1.0 → 3.1.1

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.
Files changed (2) hide show
  1. package/lib/response.js +4 -1
  2. package/package.json +1 -1
package/lib/response.js CHANGED
@@ -139,7 +139,10 @@ module.exports = {
139
139
  const cleanupPreviousStream = () => {
140
140
  if (original && isStream(original)) {
141
141
  original.once('error', () => {})
142
- destroy(original)
142
+ // Only destroy if the new value is not a stream
143
+ if (!isStream(val)) {
144
+ destroy(original)
145
+ }
143
146
  }
144
147
  }
145
148
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koa",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "Koa web app framework",
5
5
  "main": "lib/application.js",
6
6
  "exports": {