From ba8b28ad5bec5996b12ba87a1f1c31e64da642f1 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 0775f0ceefe..21521a92de1 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -367,6 +367,8 @@ export default { this.listenSyncServiceEvents() + this.$providers.forEach(p => p?.destroy()) + this.$providers = [] const syncServiceProvider = createSyncServiceProvider({ ydoc: this.$ydoc, syncService: this.$syncService,