diff --git a/README.md b/README.md index 6a6135e..0cb9342 100644 --- a/README.md +++ b/README.md @@ -255,14 +255,8 @@ Transactions: let db = Firestore.firestore() let sfReference = db.collection("cities").document("SF") -db.rx.runTransaction { transaction, errorPointer in - let sfDocument: DocumentSnapshot - do { - try sfDocument = transaction.getDocument(sfReference) - } catch let fetchError as NSError { - errorPointer?.pointee = fetchError - return nil - } +db.rx.runTransaction { transaction in + let sfDocument = try transaction.getDocument(sfReference) guard let oldPopulation = sfDocument.data()?["population"] as? Int else { let error = NSError( @@ -272,8 +266,7 @@ db.rx.runTransaction { transaction, errorPointer in NSLocalizedDescriptionKey: "Unable to retrieve population from snapshot \(sfDocument)" ] ) - errorPointer?.pointee = error - return nil + throw error } transaction.updateData(["population": oldPopulation + 1], forDocument: sfReference) diff --git a/RxFirebase.podspec b/RxFirebase.podspec index d118f21..2622c3d 100644 --- a/RxFirebase.podspec +++ b/RxFirebase.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'RxFirebase' - s.version = '0.2' + s.version = '0.2.1' s.summary = 'RxSwift extensions for Firebase.' # This description is used to generate tags and improve search results.