Skip to content

Commit

Permalink
Fixed fromObject() for google.protobuf.Any types.
Browse files Browse the repository at this point in the history
fromObject() must also be used when encoding the any type,
because otherwise string enums will not be serialized
correctly.
  • Loading branch information
manni83 committed Jun 13, 2017
1 parent 8c6a597 commit 145bda2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wrappers.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ wrappers[".google.protobuf.Any"] = {
if (type)
return this.create({
type_url: object["@type"],
value: type.encode(object).finish()
value: type.encode(type.fromObject(object)).finish()
});
}

Expand Down

0 comments on commit 145bda2

Please sign in to comment.