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) => {
sub[key] = Array.isArray(state[key])
? rtdbBindAsArray(
{
vm: state,
key,
collection: ref,
ops,
resolve,
reject,
},
options
)
: rtdbBindAsObject(
{
vm: state,
key,
document: ref,
ops,
return new Promise((resolve, reject) => {
let unbind
if (Array.isArray(vm[key])) {
unbind = bindAsArray(
{
vm,
key,
collection: source,
resolve,
reject,
ops,
},
options
)
} else {
unbind = bindAsObject(
{
vm,
key,
document: source,