Merge pull request #28 from proullon/dev/proullon/fix

fix (helper): fix isFieldMessage
This commit is contained in:
Manfred Touron 2016-12-21 16:05:35 +01:00 committed by GitHub
commit 453376e811

View File

@ -75,10 +75,8 @@ func getMessageType(f *descriptor.FileDescriptorProto, name string) *descriptor.
} }
func isFieldMessage(f *descriptor.FieldDescriptorProto) bool { func isFieldMessage(f *descriptor.FieldDescriptorProto) bool {
if f.Type != nil && *f.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE { if f.Type != nil && *f.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE &&
return true f.Label != nil && *f.Label != descriptor.FieldDescriptorProto_LABEL_REPEATED {
}
if f.TypeName != nil && (*f.TypeName)[0] == '.' {
return true return true
} }