Comparing version 3.0.0 to 3.0.1
@@ -17,23 +17,27 @@ | ||
self._ref.transaction(updateFunction, function(err, committed, snap) { | ||
try { | ||
self._ref.transaction(updateFunction, function(err, committed, snap) { | ||
Fireproof.stats._finish(id, err); | ||
snap = new Fireproof.Snapshot(snap); | ||
Fireproof.stats._finish(id, err); | ||
snap = new Fireproof.Snapshot(snap); | ||
if (onComplete) { | ||
onComplete(err, committed, snap); | ||
} | ||
if (onComplete) { | ||
onComplete(err, committed, snap); | ||
} | ||
if (err) { | ||
deferred.reject(err); | ||
} else { | ||
if (err) { | ||
deferred.reject(err); | ||
} else { | ||
deferred.resolve({ | ||
committed: committed, | ||
snapshot: snap | ||
}); | ||
deferred.resolve({ | ||
committed: committed, | ||
snapshot: snap | ||
}); | ||
} | ||
} | ||
}, applyLocally); | ||
}, applyLocally); | ||
} catch(e) { | ||
deferred.reject(e); | ||
} | ||
@@ -40,0 +44,0 @@ return deferred.promise; |
{ | ||
"name": "fireproof", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Promises for Firebase objects.", | ||
@@ -5,0 +5,0 @@ "main": "dist/fireproof.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
183420
4479