@whatwg-node/node-fetch 0.7.23-alpha-20250726023029-20cdf0c36063bdec1c3178344c818a7ceaadaf90 → 0.7.23-alpha-20250726023513-1ae33d44a98b7e7238a179b7b100c6bdb1de96e7

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/cjs/Body.js CHANGED
@@ -132,6 +132,10 @@ class PonyfillBody {
132
132
  this._chunks = [];
133
133
  return (0, utils_js_1.fakePromise)(this._chunks);
134
134
  }
135
+ if (_body.readable.destroyed) {
136
+ this._chunks = [];
137
+ return (0, utils_js_1.fakePromise)(this._chunks);
138
+ }
135
139
  const chunks = [];
136
140
  return new Promise((resolve, reject) => {
137
141
  _body.readable.on('data', chunk => {
package/esm/Body.js CHANGED
@@ -129,6 +129,10 @@ export class PonyfillBody {
129
129
  this._chunks = [];
130
130
  return fakePromise(this._chunks);
131
131
  }
132
+ if (_body.readable.destroyed) {
133
+ this._chunks = [];
134
+ return fakePromise(this._chunks);
135
+ }
132
136
  const chunks = [];
133
137
  return new Promise((resolve, reject) => {
134
138
  _body.readable.on('data', chunk => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/node-fetch",
3
- "version": "0.7.23-alpha-20250726023029-20cdf0c36063bdec1c3178344c818a7ceaadaf90",
3
+ "version": "0.7.23-alpha-20250726023513-1ae33d44a98b7e7238a179b7b100c6bdb1de96e7",
4
4
  "description": "Fetch API implementation for Node",
5
5
  "sideEffects": false,
6
6
  "dependencies": {