@@ -61,7 +61,7 @@ function subscribeToDocument(
61
61
options : Required < FirestoreOptions >
62
62
) {
63
63
const subs = Object . create ( null )
64
- const unbind = ref . onSnapshot ( ( snapshot ) => {
64
+ const unbind = ref . onSnapshot ( snapshot => {
65
65
if ( snapshot . exists ) {
66
66
updateDataFromDocumentSnapshot ( options , target , path , snapshot , subs , ops , depth , resolve )
67
67
} else {
@@ -100,9 +100,9 @@ function subscribeToRefs(
100
100
resolve : CommonBindOptionsParameter [ 'resolve' ]
101
101
) {
102
102
const refKeys = Object . keys ( refs )
103
- const missingKeys = Object . keys ( subs ) . filter ( ( refKey ) => refKeys . indexOf ( refKey ) < 0 )
103
+ const missingKeys = Object . keys ( subs ) . filter ( refKey => refKeys . indexOf ( refKey ) < 0 )
104
104
// unbind keys that are no longer there
105
- missingKeys . forEach ( ( refKey ) => {
105
+ missingKeys . forEach ( refKey => {
106
106
subs [ refKey ] . unsub ( )
107
107
delete subs [ refKey ]
108
108
} )
@@ -117,7 +117,7 @@ function subscribeToRefs(
117
117
}
118
118
}
119
119
120
- refKeys . forEach ( ( refKey ) => {
120
+ refKeys . forEach ( refKey => {
121
121
const sub = subs [ refKey ]
122
122
const ref = refs [ refKey ]
123
123
const docPath = `${ path } .${ refKey } `
@@ -203,7 +203,7 @@ export function bindCollection(
203
203
} ,
204
204
}
205
205
206
- const unbind = collection . onSnapshot ( ( snapshot ) => {
206
+ const unbind = collection . onSnapshot ( snapshot => {
207
207
// console.log('pending', metadata.hasPendingWrites)
208
208
// docs.forEach(d => console.log('doc', d, '\n', 'data', d.data()))
209
209
// NOTE: this will only be triggered once and it will be with all the documents
@@ -239,7 +239,7 @@ export function bindCollection(
239
239
}
240
240
}
241
241
}
242
- docChanges . forEach ( ( c ) => {
242
+ docChanges . forEach ( c => {
243
243
change [ c . type ] ( c )
244
244
} )
245
245
@@ -283,7 +283,7 @@ export function bindDocument(
283
283
// bind here the function so it can be resolved anywhere
284
284
// this is specially useful for refs
285
285
resolve = callOnceWithArg ( resolve , ( ) => walkGet ( vm , key ) )
286
- const unbind = document . onSnapshot ( ( snapshot ) => {
286
+ const unbind = document . onSnapshot ( snapshot => {
287
287
if ( snapshot . exists ) {
288
288
updateDataFromDocumentSnapshot ( options , vm , key , snapshot , subs , ops , 0 , resolve )
289
289
} else {
0 commit comments