@whatwg-node/node-fetch 0.7.5-alpha-20241210210919-680ecc3291b1c6c284e87af6977d8a107e1ec8cc → 0.7.5-alpha-20241210212159-eb8dfa431df1774b9cc10381472ca880c4127e3a

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.
@@ -34,7 +34,7 @@ function fetchNodeHttp(fetchRequest) {
34
34
  }
35
35
  let nodeRequest;
36
36
  // Skip using parsed URL if it's an IPv6 address (starting with brackets)
37
- if (fetchRequest.parsedUrl && !fetchRequest.parsedUrl.hostname.startsWith('[')) {
37
+ if (fetchRequest.parsedUrl && !fetchRequest.parsedUrl.hostname?.startsWith('[')) {
38
38
  nodeRequest = requestFn({
39
39
  auth: fetchRequest.parsedUrl.username
40
40
  ? `${fetchRequest.parsedUrl.username}:${fetchRequest.parsedUrl.password}`
@@ -31,7 +31,7 @@ export function fetchNodeHttp(fetchRequest) {
31
31
  }
32
32
  let nodeRequest;
33
33
  // Skip using parsed URL if it's an IPv6 address (starting with brackets)
34
- if (fetchRequest.parsedUrl && !fetchRequest.parsedUrl.hostname.startsWith('[')) {
34
+ if (fetchRequest.parsedUrl && !fetchRequest.parsedUrl.hostname?.startsWith('[')) {
35
35
  nodeRequest = requestFn({
36
36
  auth: fetchRequest.parsedUrl.username
37
37
  ? `${fetchRequest.parsedUrl.username}:${fetchRequest.parsedUrl.password}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/node-fetch",
3
- "version": "0.7.5-alpha-20241210210919-680ecc3291b1c6c284e87af6977d8a107e1ec8cc",
3
+ "version": "0.7.5-alpha-20241210212159-eb8dfa431df1774b9cc10381472ca880c4127e3a",
4
4
  "description": "Fetch API implementation for Node",
5
5
  "sideEffects": false,
6
6
  "dependencies": {