diff --git a/src/lib/components/channel/Channel.svelte b/src/lib/components/channel/Channel.svelte index 6552365ea..b205afcb3 100644 --- a/src/lib/components/channel/Channel.svelte +++ b/src/lib/components/channel/Channel.svelte @@ -190,7 +190,7 @@ }); onDestroy(() => { - // $socket?.off('channel-events', channelEventHandler); + $socket?.off('channel-events', channelEventHandler); }); diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 6e0636c2c..d5982af90 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -427,7 +427,7 @@ onDestroy(() => { chatIdUnsubscriber?.(); window.removeEventListener('message', onMessageHandler); - // $socket?.off('chat-events'); + $socket?.off('chat-events', chatEventHandler); }); // File upload functions