@hocuspocus/provider 2.8.1 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2669,15 +2669,15 @@ class HocuspocusProvider extends EventEmitter {
2669
2669
  }
2670
2670
  }
2671
2671
  destroy() {
2672
- var _a;
2673
2672
  this.emit('destroy');
2674
2673
  if (this.intervals.forceSync) {
2675
2674
  clearInterval(this.intervals.forceSync);
2676
2675
  }
2677
2676
  if (this.awareness) {
2678
2677
  removeAwarenessStates(this.awareness, [this.document.clientID], 'provider destroy');
2678
+ this.awareness.off('update', this.awarenessUpdateHandler);
2679
+ this.awareness.destroy();
2679
2680
  }
2680
- (_a = this.awareness) === null || _a === void 0 ? void 0 : _a.off('update', this.awarenessUpdateHandler);
2681
2681
  this.document.off('update', this.documentUpdateHandler);
2682
2682
  this.removeAllListeners();
2683
2683
  this.configuration.websocketProvider.off('connect', this.configuration.onConnect);
@@ -2709,7 +2709,6 @@ class HocuspocusProvider extends EventEmitter {
2709
2709
  this.isAuthenticated = true;
2710
2710
  this.authorizedScope = scope;
2711
2711
  this.emit('authenticated');
2712
- this.startSync();
2713
2712
  }
2714
2713
  get broadcastChannel() {
2715
2714
  return `${this.configuration.name}`;