undici 5.27.1 → 5.27.2

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.
@@ -119,7 +119,8 @@ class Request {
119
119
  } else if (util.isStream(body)) {
120
120
  this.body = body
121
121
 
122
- if (!this.body._readableState?.autoDestroy) {
122
+ const rState = this.body._readableState
123
+ if (!rState || !rState.autoDestroy) {
123
124
  this.endHandler = function autoDestroy () {
124
125
  util.destroy(this)
125
126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici",
3
- "version": "5.27.1",
3
+ "version": "5.27.2",
4
4
  "description": "An HTTP/1.1 client, written from scratch for Node.js",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {