Merge pull request #60 from WardPearce/fix/watch-leave
Fixed disconnect not working
This commit is contained in:
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user