From e524f04c310ca0f9355e56f37c8275c0df50703a Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 18 Dec 2023 15:35:51 +0100 Subject: [PATCH] fix(sync): clear old providers on reconnect avoids the old provider leaking error events. Signed-off-by: Max --- src/components/Editor.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Editor.vue b/src/components/Editor.vue index 6b4cce51790..2ccfcb1511a 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -378,6 +378,8 @@ export default { this.listenSyncServiceEvents() + this.$providers.forEach(p => p?.destroy()) + this.$providers = [] const syncServiceProvider = createSyncServiceProvider({ ydoc: this.$ydoc, syncService: this.$syncService,