Skip to content

Commit

Permalink
fix: prevent double brackets for ipv6 format
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 27, 2023
1 parent f9f1be3 commit 2110e40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function generateURL(
) {
port = "";
}
if (hostname.includes(":")) {
if (hostname[0] !== "[" && hostname.includes(":")) {
hostname = `[${hostname}]`;
}
return (
Expand Down

0 comments on commit 2110e40

Please sign in to comment.