Skip to content
Prev Previous commit
Next Next commit
Fix error 'TypeError: Cannot read property 'snapshot' of undefined'
  • Loading branch information
FrankSalad committed Jan 8, 2017
commit 5d31027be68b2fa74c5c04bb20ac0ab8c50c16c6
2 changes: 1 addition & 1 deletion lib/modules/database/reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default class Reference extends ReferenceBase {
transaction(transactionUpdate, onComplete, applyLocally) {
const path = this._dbPath();
return this.db.addTransaction(path, transactionUpdate, applyLocally)
.then(({ snapshot, committed }) => {snapshot: new Snapshot(this, snapshot), committed})
.then((({ snapshot, committed }) => {return {snapshot: new Snapshot(this, snapshot), committed}}).bind(this))
.then(({ snapshot, committed }) => {
if (isFunction(onComplete)) onComplete(null, snapshot);
return {snapshot, committed};
Expand Down