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 <[email protected]>
  • Loading branch information
max-nextcloud committed Jan 9, 2024
1 parent 161fb3c commit ba8b28a
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 @@ -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,
Expand Down

0 comments on commit ba8b28a

Please sign in to comment.