We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 422a25b commit 5861a42Copy full SHA for 5861a42
lib/internal/url.js
@@ -1171,9 +1171,9 @@ function urlToHttpOptions(url) {
1171
__proto__: null,
1172
...url, // In case the url object was extended by the user.
1173
protocol: url.protocol,
1174
- hostname: url.hostname && StringPrototypeStartsWith(url.hostname, '[') ?
1175
- StringPrototypeSlice(url.hostname, 1, -1) :
1176
- url.hostname,
+ hostname: hostname && StringPrototypeStartsWith(hostname, '[') ?
+ StringPrototypeSlice(hostname, 1, -1) :
+ hostname,
1177
hash: url.hash,
1178
search: search,
1179
pathname: pathname,
0 commit comments