@whatwg-node/node-fetch 0.5.20-rc-20240730145649-3d326c64a43b48290c8c30454172053ce6c74732 → 0.5.20-rc-20240730162055-2138d30b4ce4d4386c395f17634ea3a25aa6c171

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/Request.js CHANGED
@@ -76,13 +76,13 @@ class PonyfillRequest extends Body_js_1.PonyfillBody {
76
76
  }
77
77
  }
78
78
  if (requestInit?.agent != null) {
79
- if (requestInit?.agent === false) {
79
+ if (requestInit.agent === false) {
80
80
  this._agent = false;
81
81
  }
82
- if (this.url.startsWith('http:/') && this._agent instanceof http_1.Agent) {
82
+ else if (this.url.startsWith('http:/') && requestInit.agent instanceof http_1.Agent) {
83
83
  this._agent = requestInit?.agent;
84
84
  }
85
- else if (this.url.startsWith('https:/') && this._agent instanceof https_1.Agent) {
85
+ else if (this.url.startsWith('https:/') && requestInit.agent instanceof https_1.Agent) {
86
86
  this._agent = requestInit?.agent;
87
87
  }
88
88
  }
package/esm/Request.js CHANGED
@@ -73,13 +73,13 @@ export class PonyfillRequest extends PonyfillBody {
73
73
  }
74
74
  }
75
75
  if (requestInit?.agent != null) {
76
- if (requestInit?.agent === false) {
76
+ if (requestInit.agent === false) {
77
77
  this._agent = false;
78
78
  }
79
- if (this.url.startsWith('http:/') && this._agent instanceof HTTPAgent) {
79
+ else if (this.url.startsWith('http:/') && requestInit.agent instanceof HTTPAgent) {
80
80
  this._agent = requestInit?.agent;
81
81
  }
82
- else if (this.url.startsWith('https:/') && this._agent instanceof HTTPSAgent) {
82
+ else if (this.url.startsWith('https:/') && requestInit.agent instanceof HTTPSAgent) {
83
83
  this._agent = requestInit?.agent;
84
84
  }
85
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/node-fetch",
3
- "version": "0.5.20-rc-20240730145649-3d326c64a43b48290c8c30454172053ce6c74732",
3
+ "version": "0.5.20-rc-20240730162055-2138d30b4ce4d4386c395f17634ea3a25aa6c171",
4
4
  "description": "Fetch API implementation for Node",
5
5
  "sideEffects": false,
6
6
  "dependencies": {