Skip to content

Commit

Permalink
More refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
osa1 committed Sep 12, 2022
1 parent 1dddc1b commit aa492a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protobuf/lib/src/protobuf/field_set.dart
Original file line number Diff line number Diff line change
Expand Up @@ -786,12 +786,12 @@ class _FieldSet {

if (fi.isGroupOrMessage) {
final currentFieldValue = _values[fi.index!];
final GeneratedMessage msg = fieldValue;
if (currentFieldValue == null) {
final GeneratedMessage msg = fieldValue;
fieldValue = msg.deepCopy();
} else {
final GeneratedMessage currentMsg = currentFieldValue;
fieldValue = currentMsg..mergeFromMessage(fieldValue);
fieldValue = currentMsg..mergeFromMessage(msg);
}
}

Expand Down

0 comments on commit aa492a9

Please sign in to comment.