Added alias getFieldProto3 as used by older generated code.
Un-breaks users who have old generated code and upgrade to the 3.1.0 release.
This commit is contained in:
parent
4a4a1627c1
commit
f2eeaf7110
1 changed files with 12 additions and 0 deletions
|
@ -754,6 +754,18 @@ jspb.Message.getFieldWithDefault = function(msg, fieldNumber, defaultValue) {
|
|||
};
|
||||
|
||||
|
||||
/**
|
||||
* Alias for getFieldWithDefault used by older generated code.
|
||||
* @template T
|
||||
* @param {!jspb.Message} msg A jspb proto.
|
||||
* @param {number} fieldNumber The field number.
|
||||
* @param {T} defaultValue The default value.
|
||||
* @return {T} The field's value.
|
||||
* @protected
|
||||
*/
|
||||
jspb.Message.getFieldProto3 = jspb.Message.getFieldWithDefault;
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value of a map field, lazily creating the map container if
|
||||
* necessary.
|
||||
|
|
Loading…
Add table
Reference in a new issue