Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
revert slice
  • Loading branch information
Mert Can Altin Mert Can Altin
Mert Can Altin authored and Mert Can Altin committed Oct 17, 2024
commit 5b77adbb5d409cda82c1ec5f96dc40290e522e96
3 changes: 2 additions & 1 deletion lib/internal/modules/esm/fetch_module.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const {
ObjectPrototypeHasOwnProperty,
PromisePrototypeThen,
SafeMap,
StringPrototypeSlice,
} = primordials;
const {
Buffer: { concat: BufferConcat },
Expand Down Expand Up @@ -248,7 +249,7 @@ async function isLocalAddress(hostname) {
hostname[0] === '[' &&
hostname[hostname.length - 1] === ']'
) {
hostname = hostname.slice(1, -1);
hostname = StringPrototypeSlice(hostname, 1, -1);
}
const addr = await dnsLookup(hostname, { order: 'verbatim' });
const ipv = addr.family === 4 ? 'ipv4' : 'ipv6';
Expand Down