commit
59993e28b6
1 changed files with 11 additions and 0 deletions
|
|
@ -328,6 +328,17 @@ const logoff = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const instantiateGun = () => {
|
const instantiateGun = () => {
|
||||||
|
if (user) {
|
||||||
|
user.leave()
|
||||||
|
}
|
||||||
|
// @ts-ignore
|
||||||
|
user = null
|
||||||
|
if (gun) {
|
||||||
|
gun.off()
|
||||||
|
}
|
||||||
|
// @ts-ignore
|
||||||
|
gun = null
|
||||||
|
|
||||||
const _gun = /** @type {unknown} */ (new Gun({
|
const _gun = /** @type {unknown} */ (new Gun({
|
||||||
axe: false,
|
axe: false,
|
||||||
peers: Config.PEERS
|
peers: Config.PEERS
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue