Skip to content

Commit 5d31027

Browse files
committed
Fix error 'TypeError: Cannot read property 'snapshot' of undefined'
1 parent 12a3f1c commit 5d31027

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/modules/database/reference.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default class Reference extends ReferenceBase {
126126
transaction(transactionUpdate, onComplete, applyLocally) {
127127
const path = this._dbPath();
128128
return this.db.addTransaction(path, transactionUpdate, applyLocally)
129-
.then(({ snapshot, committed }) => {snapshot: new Snapshot(this, snapshot), committed})
129+
.then((({ snapshot, committed }) => {return {snapshot: new Snapshot(this, snapshot), committed}}).bind(this))
130130
.then(({ snapshot, committed }) => {
131131
if (isFunction(onComplete)) onComplete(null, snapshot);
132132
return {snapshot, committed};

0 commit comments

Comments
 (0)