From 6f567cad22e952259b77176d0b0221fca2c61923 Mon Sep 17 00:00:00 2001 From: WardPearce Date: Sat, 6 Apr 2024 18:32:58 +1300 Subject: [PATCH] Fixed disconnect not working --- materialious/src/routes/+layout.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } });