diff --git a/packages/grpc-js/src/subchannel.ts b/packages/grpc-js/src/subchannel.ts index 87805246..a8c81df8 100644 --- a/packages/grpc-js/src/subchannel.ts +++ b/packages/grpc-js/src/subchannel.ts @@ -473,7 +473,7 @@ export class Subchannel { } ); const hostPort = splitHostPort(targetPath); - connectionOptions.servername = (hostPort !== null) ? hostPort.host : targetPath; + connectionOptions.servername = hostPort?.host ?? : targetPath; } } }