Skip to content

Commit

Permalink
CLI: Skip defaults when generating proto3 (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO authored Nov 25, 2017
2 parents 34eee42 + 9afb8a2 commit e04ddc4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/targets/proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ function buildFieldOptions(field) {
return;
break;
case "default":
if (syntax === 3)
return;
// skip default (resolved) default values
if (field.long && !util.longNeq(field.defaultValue, types.defaults[field.type]) || !field.long && field.defaultValue === types.defaults[field.type])
return;
Expand Down

0 comments on commit e04ddc4

Please sign in to comment.