Skip to content

Commit c122200

Browse files
committed
Set context on cancelCallback
Fix #120 Closes #126
1 parent 57b5568 commit c122200

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vuefire.js

+3
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ function bind (vm, key, source) {
9494
var ref = _getRef(source)
9595
vm.$firebaseRefs[key] = ref
9696
vm._firebaseSources[key] = source
97+
if (cancelCallback) {
98+
cancelCallback = cancelCallback.bind(vm)
99+
}
97100
// bind based on initial value type
98101
if (asObject) {
99102
bindAsObject(vm, key, source, cancelCallback)

0 commit comments

Comments
 (0)