@abraca/dabra 1.8.0 → 1.8.1

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.
@@ -2810,6 +2810,7 @@ var AbracadabraProvider = class AbracadabraProvider extends AbracadabraBaseProvi
2810
2810
  this.childAccessTimes = /* @__PURE__ */ new Map();
2811
2811
  this.pinnedChildren = /* @__PURE__ */ new Set();
2812
2812
  this.boundHandleYSubdocsChange = this.handleYSubdocsChange.bind(this);
2813
+ this.hasCachedContent = false;
2813
2814
  this._client = client;
2814
2815
  this.abracadabraConfig = configuration;
2815
2816
  this.subdocLoading = configuration.subdocLoading ?? "lazy";
@@ -2847,8 +2848,14 @@ var AbracadabraProvider = class AbracadabraProvider extends AbracadabraBaseProvi
2847
2848
  async _initFromOfflineStore() {
2848
2849
  if (!this.offlineStore) return;
2849
2850
  const [snapshot, pending] = await Promise.all([this.offlineStore.getDocSnapshot().catch(() => null), this.offlineStore.getPendingUpdates().catch(() => [])]);
2850
- if (snapshot) Y.applyUpdate(this.document, snapshot, this.offlineStore);
2851
- for (const update of pending) Y.applyUpdate(this.document, update, this.offlineStore);
2851
+ if (snapshot) {
2852
+ Y.applyUpdate(this.document, snapshot, this.offlineStore);
2853
+ this.hasCachedContent = true;
2854
+ }
2855
+ for (const update of pending) {
2856
+ Y.applyUpdate(this.document, update, this.offlineStore);
2857
+ this.hasCachedContent = true;
2858
+ }
2852
2859
  }
2853
2860
  authenticatedHandler(scope) {
2854
2861
  super.authenticatedHandler(scope);