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,
|
path,
|
||||||
type: 'map.on'
|
type: 'map.on'
|
||||||
}
|
}
|
||||||
currentGun.send(msg)
|
isReady().then(() => {
|
||||||
|
currentGun.send(msg)
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
// eslint-disable-next-line no-multi-assign
|
// eslint-disable-next-line no-multi-assign
|
||||||
const listeners =
|
const listeners =
|
||||||
|
|
@ -441,7 +443,9 @@ function createReplica(path, afterMap = false) {
|
||||||
path,
|
path,
|
||||||
type: 'on'
|
type: 'on'
|
||||||
}
|
}
|
||||||
currentGun.send(msg)
|
isReady().then(() => {
|
||||||
|
currentGun.send(msg)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return this
|
return this
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue