aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/API
diff options
context:
space:
mode:
authorGravatar zxu <zxu@google.com>2017-12-11 15:37:01 -0500
committerGravatar GitHub <noreply@github.com>2017-12-11 15:37:01 -0500
commit54ba423c87d6e0a409e4fa3dc95cd81ca16b97f7 (patch)
treec232df19ef070105f7db11c35e7ecdf1d9b2ba07 /Firestore/Source/API
parentc6b8c5288c2d154df0de98477ed15c54e2084fbb (diff)
Revisit commit method in FIRWriteBatch (#541)
* revisit FIRWriteBatch commit * make commitWithCompletion completion nullable; * add commit; * add unit test; * add swift build test for commit; * update CHANGELOG.
Diffstat (limited to 'Firestore/Source/API')
-rw-r--r--Firestore/Source/API/FIRWriteBatch.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/Firestore/Source/API/FIRWriteBatch.m b/Firestore/Source/API/FIRWriteBatch.m
index b918a9a..b1cfa09 100644
--- a/Firestore/Source/API/FIRWriteBatch.m
+++ b/Firestore/Source/API/FIRWriteBatch.m
@@ -93,7 +93,11 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
-- (void)commitWithCompletion:(void (^)(NSError *_Nullable error))completion {
+- (void)commit {
+ [self commitWithCompletion:nil];
+}
+
+- (void)commitWithCompletion:(nullable void (^)(NSError *_Nullable error))completion {
[self verifyNotCommitted];
self.committed = TRUE;
[self.firestore.client writeMutations:self.mutations completion:completion];