diff --git a/services/gunDB/Mediator/index.js b/services/gunDB/Mediator/index.js index 2b91bae7..cd15c802 100644 --- a/services/gunDB/Mediator/index.js +++ b/services/gunDB/Mediator/index.js @@ -328,6 +328,17 @@ const logoff = () => { } const instantiateGun = () => { + if (user) { + user.leave() + } + // @ts-ignore + user = null + if (gun) { + gun.off() + } + // @ts-ignore + gun = null + const _gun = /** @type {unknown} */ (new Gun({ axe: false, peers: Config.PEERS