protobufjs 7.2.1 → 7.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * protobuf.js v7.2.1 (c) 2016, daniel wirtz
3
- * compiled thu, 02 feb 2023 21:27:33 utc
2
+ * protobuf.js v7.2.3 (c) 2016, daniel wirtz
3
+ * compiled mon, 27 mar 2023 18:08:22 utc
4
4
  * licensed under the bsd-3-clause license
5
5
  * see: https://github.com/dcodeio/protobuf.js for details
6
6
  */
@@ -4425,6 +4425,10 @@ function tryHandleExtension(root, field) {
4425
4425
  var extendedType = field.parent.lookup(field.extend);
4426
4426
  if (extendedType) {
4427
4427
  var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);
4428
+ //do not allow to extend same field twice to prevent the error
4429
+ if (extendedType.get(sisterField.name)) {
4430
+ return true;
4431
+ }
4428
4432
  sisterField.declaringField = field;
4429
4433
  field.extensionField = sisterField;
4430
4434
  extendedType.add(sisterField);