diff --git a/materialious/src/routes/+layout.svelte b/materialious/src/routes/+layout.svelte index b4cf6e26..57f58dfd 100644 --- a/materialious/src/routes/+layout.svelte +++ b/materialious/src/routes/+layout.svelte @@ -120,7 +120,7 @@ const currentUrl = new URL(location.href); if ($syncPartyPeer) { - $syncPartyPeer.disconnect(); + $syncPartyPeer.destroy(); syncPartyPeer.set(null); currentUrl.searchParams.delete('sync'); window.history.pushState({ path: currentUrl.toString() }, '', currentUrl.toString()); @@ -264,7 +264,7 @@ onDestroy(() => { if ($syncPartyPeer) { - $syncPartyPeer.disconnect(); + $syncPartyPeer.destroy(); $syncPartyPeer = null; } });