Timothy Jaeryang Baek há 2 meses atrás
pai
commit
6bd2bc5683
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      src/routes/+layout.svelte

+ 3 - 0
src/routes/+layout.svelte

@@ -462,6 +462,9 @@
 
 				$socket?.on('chat-events', chatEventHandler);
 				$socket?.on('channel-events', channelEventHandler);
+			} else {
+				$socket?.off('chat-events', chatEventHandler);
+				$socket?.off('channel-events', channelEventHandler);
 			}
 		});