Skip to content

Commit

Permalink
fix(sync): clear old providers on reconnect
Browse files Browse the repository at this point in the history
avoids the old provider leaking error events.

Signed-off-by: Max <max@nextcloud.com>
  • Loading branch information
max-nextcloud committed Dec 19, 2023
1 parent f70293d commit 422d227
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ export default {
this.listenSyncServiceEvents()
this.$providers.forEach(p => p?.destroy())
this.$providers = []
const syncServiceProvider = createSyncServiceProvider({
ydoc: this.$ydoc,
syncService: this.$syncService,
Expand Down

0 comments on commit 422d227

Please sign in to comment.