Skip to content

Commit 6e08e8c

Browse files
author
Michael Lehenbauer
committed
CR feedback.
1 parent 74c3617 commit 6e08e8c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ - (void)deleteDocumentRef:(FIRDocumentReference *)ref {
278278

279279
- (void)mergeDocumentRef:(FIRDocumentReference *)ref data:(NSDictionary<NSString *, id> *)data {
280280
[ref setData:data
281-
merge:TRUE
281+
merge:YES
282282
completion:[self completionForExpectationWithName:@"setDataWithMerge"]];
283283
[self awaitExpectations];
284284
}

Firestore/Source/API/FSTUserDataConverter.mm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,10 @@ - (nullable FSTFieldValue *)parseData:(id)input context:(FSTParseContext *)conte
517517
return [self parseDictionary:(NSDictionary *)input context:context];
518518

519519
} else if ([input isKindOfClass:[FIRFieldValue class]]) {
520-
// parseSentinelFieldValue may add an FSTFieldTransform, but nothing should be included in
521-
// the actual parsed data, so we don't add this path to our fieldMask and we return nil.
520+
// FieldValues usually parse into transforms (except FieldValue.delete()) in which case we
521+
// do not want to include this field in our parsed data (as doing so will overwrite the field
522+
// directly prior to the transform trying to transform it). So we don't call appendToFieldMask
523+
// and we return nil as our parsing result.
522524
[self parseSentinelFieldValue:(FIRFieldValue *)input context:context];
523525
return nil;
524526

0 commit comments

Comments
 (0)