From 4c817e18542b6f2dea7f189827230e951bb16089 Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Sun, 4 Sep 2022 21:11:16 +0200 Subject: [PATCH] fix: unbind awareness events before destroying awareness (#2330) Signed-off-by: Tilman Vatteroth Signed-off-by: Tilman Vatteroth --- .../editor-page/editor-pane/hooks/yjs/websocket-connection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/editor-page/editor-pane/hooks/yjs/websocket-connection.ts b/src/components/editor-page/editor-pane/hooks/yjs/websocket-connection.ts index ef412140e..8f0388cef 100644 --- a/src/components/editor-page/editor-pane/hooks/yjs/websocket-connection.ts +++ b/src/components/editor-page/editor-pane/hooks/yjs/websocket-connection.ts @@ -35,8 +35,8 @@ export class WebsocketConnection extends WebsocketTransporter { } } this.on('disconnected', () => { - awareness.destroy() awareness.off('update', updateCallback) + awareness.destroy() }) this.on('ready', () => {