Skip to content

Commit bf04704

Browse files
Merge pull request nestjs#1458 from flex/patch-1
bugfix(grpc): handle null value in the proto definition
2 parents b289daa + 40ce9e4 commit bf04704

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/microservices/server/server-grpc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export class ServerGrpc extends Server implements CustomTransportStrategy {
227227
const nameExtended = this.parseDeepServiceName(name, key);
228228
const deepDefinition = grpcDefinition[key];
229229

230-
const isServiceDefined = !isUndefined(deepDefinition.service);
230+
const isServiceDefined = deepDefinition && !isUndefined(deepDefinition.service);
231231
const isServiceBoolean = isServiceDefined
232232
? deepDefinition.service !== false
233233
: false;

0 commit comments

Comments
 (0)