Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve, reject) => {
let unbind
if (ref.where) {
unbind = bindCollection(
{
vm,
key,
ops,
collection: ref,
resolve,
reject,
},
options
)
} else {
unbind = bindDocument(
{
vm,
key,
ops,
document: ref,
resolve,
reject,
},
options
)
}
vm._firestoreUnbinds[key] = unbind
})
}
return new Promise((resolve, reject) => {
let unbind
if ('where' in ref) {
unbind = bindCollection(
{
vm,
key,
ops,
collection: ref,
resolve,
reject,
},
options
)
} else {
unbind = bindDocument(
{
vm,
key,
ops,
document: ref,
resolve,
reject,
},
options
)
}
vm._firestoreUnbinds[key] = unbind
})
}
return new Promise((resolve, reject) => {
sub[key] =
'where' in ref
? bindCollection(
{
vm: state,
key,
collection: ref,
ops,
resolve,
reject,
},
options
)
: bindDocument(
{
vm: state,
key,
document: ref,
ops,
resolve,
reject,
},
options
)
})
}