Skip to content

Commit bbd50fa

Browse files
Attempt to re-gen key
1 parent 65f16f1 commit bbd50fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Firestore/core/src/model/object_value.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ void ApplyChanges(
129129

130130
// Check if the source key is updated by the next upsert
131131
if (upsert_it != upserts.end() && upsert_it->first == key) {
132-
FreeNanopbMessage(google_firestore_v1_Value_fields,
133-
&source_fields[source_index].value);
134-
target_fields[target_index].key = source_fields[source_index].key;
132+
FreeNanopbMessage(google_firestore_v1_MapValue_FieldsEntry_fields,
133+
&source_fields[source_index]);
134+
target_fields[target_index].key = MakeBytesArray(upsert_it->first);
135135
target_fields[target_index].value = DeepClone(upsert_it->second);
136136

137137
++upsert_it;

0 commit comments

Comments
 (0)