Update http_proxy.ts

This commit is contained in:
WK 2020-09-01 01:28:53 +08:00 committed by GitHub
parent 6a99983ed1
commit 148b273f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ export function getProxiedConnection(
* See https://github.com/grpc/grpc-node/pull/1369 for more info. */
const targetPath = getDefaultAuthority(parsedTarget);
const hostPort = splitHostPort(targetPath);
const remoteHost = (hostPort !== null) ? hostPort.host : targetPath;
const remoteHost = hostPort?.host ?? targetPath;
const cts = tls.connect(
{