From ddf67d193d50fb9817755c11680ab3089365dbcb Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 18 Nov 2019 21:37:54 -0800 Subject: [PATCH] fix: extra check for undefined (#144) --- typescript/src/schema/proto.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/typescript/src/schema/proto.ts b/typescript/src/schema/proto.ts index b05aa3d5c..824534f7d 100644 --- a/typescript/src/schema/proto.ts +++ b/typescript/src/schema/proto.ts @@ -389,7 +389,11 @@ function augmentMethod( }, method ) as MethodDescriptorProto; - if (method.inputType && messages[method.inputType].field) { + if ( + method.inputType && + messages[method.inputType] && + messages[method.inputType].field + ) { const paramComment: Comment[] = []; const inputType = messages[method.inputType!]; const inputmessageName = toMessageName(method.inputType);