Skip to content

Commit 42a0274

Browse files
committed
grpc-js: Fix compilation error from new @types/node version
1 parent 2e90603 commit 42a0274

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/grpc-js/src/server-call.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,8 +954,8 @@ export class Http2ServerCallStream<
954954
}
955955

956956
getPeer(): string {
957-
const socket = this.stream.session.socket;
958-
if (socket.remoteAddress) {
957+
const socket = this.stream.session?.socket;
958+
if (socket?.remoteAddress) {
959959
if (socket.remotePort) {
960960
return `${socket.remoteAddress}:${socket.remotePort}`;
961961
} else {

0 commit comments

Comments
 (0)