Skip to content

Commit 00c0d0a

Browse files
chrisradeksrchase
authored andcommitted
Code Commit browser (#76)
* Only add port in fetch handler if it is defined * Adds codecommit browser package
1 parent ccd0c2e commit 00c0d0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/fetch-http-handler/src/fetch-http-handler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export class FetchHttpHandler implements HttpHandler<ReadableStream, BrowserHttp
3333
abortError.name = 'AbortError';
3434
return Promise.reject(abortError);
3535
}
36-
37-
const url = `${request.protocol}//${request.hostname}:${request.port}${request.path}`;
36+
const port = request.port;
37+
const url = `${request.protocol}//${request.hostname}${port ? `:${port}` : ''}${request.path}`;
3838
const requestOptions: RequestInit = {
3939
body: request.body,
4040
headers: new Headers(request.headers),

0 commit comments

Comments
 (0)