dexie-cloud-addon 4.0.1-beta.30 → 4.0.1-beta.31

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.
@@ -2539,7 +2539,7 @@
2539
2539
  catch (_a) { }
2540
2540
 
2541
2541
  const swHolder = {};
2542
- const swContainer = self.document && navigator.serviceWorker; // self.document is to verify we're not the SW ourself
2542
+ const swContainer = typeof self !== undefined && self.document && navigator.serviceWorker; // self.document is to verify we're not the SW ourself
2543
2543
  if (swContainer)
2544
2544
  swContainer.ready.then((registration) => (swHolder.registration = registration));
2545
2545
  if (typeof self !== 'undefined' && 'clients' in self && !self.document) {
@@ -2573,7 +2573,7 @@
2573
2573
  // We're a service worker. Propagate to our browser clients.
2574
2574
  [...self['clients'].matchAll({ includeUncontrolled: true })].forEach((client) => client.postMessage({
2575
2575
  type: `sw-broadcast-${this.name}`,
2576
- message
2576
+ message,
2577
2577
  }));
2578
2578
  }
2579
2579
  else if (swHolder.registration) {
@@ -2581,7 +2581,7 @@
2581
2581
  // Post to SW so it can repost to all its clients and to itself
2582
2582
  (_a = swHolder.registration.active) === null || _a === void 0 ? void 0 : _a.postMessage({
2583
2583
  type: `sw-broadcast-${this.name}`,
2584
- message
2584
+ message,
2585
2585
  });
2586
2586
  }
2587
2587
  }