Actually pass through wait

This commit is contained in:
Daniel Lugo 2021-09-16 11:58:09 -04:00
parent dd79430e42
commit 03790b46b5

View file

@ -561,7 +561,8 @@ function createReplica(path, afterMap = false) {
}) })
}, },
specialOnce(cb, _wait = 1000) { specialOnce(cb, _wait = 1000) {
this.once((data, key) => { this.once(
(data, key) => {
if (isPopulated(data) || _wait > 100000) { if (isPopulated(data) || _wait > 100000) {
cb(data, key) cb(data, key)
} else { } else {
@ -570,7 +571,9 @@ function createReplica(path, afterMap = false) {
this.specialOnce(cb, _wait * 3) this.specialOnce(cb, _wait * 3)
}) })
} }
}) },
{ wait: _wait }
)
return this return this
}, },
specialThen() { specialThen() {