Skip to content

Commit

Permalink
js message support for jstype string on integers (#4332)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoad authored and TeBoring committed Apr 2, 2018
1 parent 40d6eca commit 579f81e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions js/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,17 @@ jspb.Message.setProto3IntField = function(msg, fieldNumber, value) {
};


/**
* Sets the value of a non-extension integer, handled as string, field of a proto3
* @param {!jspb.Message} msg A jspb proto.
* @param {number} fieldNumber The field number.
* @param {number} value New value
* @protected
*/
jspb.Message.setProto3StringIntField = function(msg, fieldNumber, value) {
jspb.Message.setFieldIgnoringDefault_(msg, fieldNumber, value, '0');
};

/**
* Sets the value of a non-extension floating point field of a proto3
* @param {!jspb.Message} msg A jspb proto.
Expand Down

0 comments on commit 579f81e

Please sign in to comment.