From 27605c6ff239ccdff453f64badcd10bd434b0562 Mon Sep 17 00:00:00 2001 From: Arnaud Dorgans Date: Fri, 22 Jun 2018 19:33:52 +0200 Subject: [PATCH] bump --- README.md | 13 +++---------- RxFirebase.podspec | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) 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.