From d9b4d117307df9be16e5f69d1749a80b89c651a7 Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Fri, 26 Jul 2024 10:36:15 +0500 Subject: [PATCH] Fix leave room (#6150) Signed-off-by: Denis Bykhov --- plugins/love-resources/src/components/ControlExt.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/love-resources/src/components/ControlExt.svelte b/plugins/love-resources/src/components/ControlExt.svelte index 971865015d..a08fce5cfe 100644 --- a/plugins/love-resources/src/components/ControlExt.svelte +++ b/plugins/love-resources/src/components/ControlExt.svelte @@ -352,7 +352,7 @@ }) const beforeUnloadListener = () => { - if ($myInfo !== undefined) { + if ($myInfo !== undefined && $isCurrentInstanceConnected) { leaveRoom($myInfo, $myOffice) } }