Skip to content

Commit 99ae020

Browse files
authored
Merge pull request #2539 from murgatroid99/grpc-js_pick_first_null_check
grpc-js: Add null check in pick_first array access
2 parents f6dd4aa + a4ba925 commit 99ae020

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/grpc-js/src/load-balancer-pick-first.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ export class PickFirstLoadBalancer implements LoadBalancer {
306306
this.children[subchannelIndex].subchannel.getAddress()
307307
);
308308
process.nextTick(() => {
309-
this.children[subchannelIndex].subchannel.startConnecting();
309+
this.children[subchannelIndex]?.subchannel.startConnecting();
310310
});
311311
}
312312
this.connectionDelayTimeout = setTimeout(() => {

0 commit comments

Comments
 (0)