Wait for readyness before sending msg
This commit is contained in:
parent
ed3bab0f8e
commit
5d8f9054f8
1 changed files with 6 additions and 2 deletions
|
|
@ -428,7 +428,9 @@ function createReplica(path, afterMap = false) {
|
|||
path,
|
||||
type: 'map.on'
|
||||
}
|
||||
currentGun.send(msg)
|
||||
isReady().then(() => {
|
||||
currentGun.send(msg)
|
||||
})
|
||||
} else {
|
||||
// eslint-disable-next-line no-multi-assign
|
||||
const listeners =
|
||||
|
|
@ -441,7 +443,9 @@ function createReplica(path, afterMap = false) {
|
|||
path,
|
||||
type: 'on'
|
||||
}
|
||||
currentGun.send(msg)
|
||||
isReady().then(() => {
|
||||
currentGun.send(msg)
|
||||
})
|
||||
}
|
||||
|
||||
return this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue