aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--js/message.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/message.js b/js/message.js
index b150722a..8def763e 100644
--- a/js/message.js
+++ b/js/message.js
@@ -755,6 +755,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.
*