aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Local
diff options
context:
space:
mode:
authorGravatar rsgowman <rgowman@google.com>2018-01-11 11:50:49 -0500
committerGravatar Gil <mcg@google.com>2018-01-11 08:50:49 -0800
commit1bafdb4ce55db1c743c36f70de810899c55e0992 (patch)
tree0182fd9af344e573f4d6a923df71c2d5f4a8db51 /Firestore/Source/Local
parent4cdd87af03495f529b2a4c857ea2e4d74b81a862 (diff)
Fix FSTLocalDocumentsView to allow multiple mutations while offline (#644)
* Fix FSTLocalDocumentsView to allow multiple mutations while offline. Previously, only the last mutation would actually be visible.
Diffstat (limited to 'Firestore/Source/Local')
-rw-r--r--Firestore/Source/Local/FSTLocalDocumentsView.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Firestore/Source/Local/FSTLocalDocumentsView.m b/Firestore/Source/Local/FSTLocalDocumentsView.m
index a6734c4..0e88958 100644
--- a/Firestore/Source/Local/FSTLocalDocumentsView.m
+++ b/Firestore/Source/Local/FSTLocalDocumentsView.m
@@ -167,9 +167,9 @@ NS_ASSUME_NONNULL_BEGIN
BOOL *stop) {
FSTMaybeDocument *mutatedDoc = [self localDocument:remoteDocument key:key];
if ([mutatedDoc isKindOfClass:[FSTDeletedDocument class]]) {
- result = [documents dictionaryByRemovingObjectForKey:key];
+ result = [result dictionaryByRemovingObjectForKey:key];
} else if ([mutatedDoc isKindOfClass:[FSTDocument class]]) {
- result = [documents dictionaryBySettingObject:(FSTDocument *)mutatedDoc forKey:key];
+ result = [result dictionaryBySettingObject:(FSTDocument *)mutatedDoc forKey:key];
} else {
FSTFail(@"Unknown document: %@", mutatedDoc);
}