Skip to content

Commit edb47ab

Browse files
committed
fix: only use port when host does not include more than one host
1 parent 2dff7d3 commit edb47ab

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@secjs/utils",
3-
"version": "1.7.1",
3+
"version": "1.7.2",
44
"description": "",
55
"license": "MIT",
66
"author": "João Lenon",

src/Classes/Parser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ export class Parser {
272272
} else {
273273
url = url.concat(host)
274274

275-
if (port) url = url.concat(`:${port}`)
275+
// If port exists and host does not include more than one host
276+
if (port && !host.includes(',')) url = url.concat(`:${port}`)
276277
}
277278

278279
url = url.concat(`/${database}`)

0 commit comments

Comments
 (0)