Skip to content

Commit 6efef32

Browse files
committed
fix(port): dont override port
1 parent fbb56b5 commit 6efef32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class $RefParser<S extends object = JSONSchema, O extends ParserOptions<S
9999
// when schema id has defined an URL should use that hostname to request the references,
100100
// instead of using the current page URL
101101
const params = url.parse(args.schema.$id as string);
102-
const port = params.protocol === "https:" ? 443 : 80;
102+
const port = params.port ?? (params.protocol === "https:" ? 443 : 80);
103103

104104
args.path = `${params.protocol}//${params.hostname}:${port}`;
105105
}

0 commit comments

Comments
 (0)