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 18, 2023
1 parent 1911a14 commit a90b7f0
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 @@ -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,
Expand Down

0 comments on commit a90b7f0

Please sign in to comment.