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.
@@ -148,7 +148,7 @@ try {
148
148
  catch (_a) { }
149
149
 
150
150
  const swHolder = {};
151
- const swContainer = self.document && navigator.serviceWorker; // self.document is to verify we're not the SW ourself
151
+ const swContainer = typeof self !== undefined && self.document && navigator.serviceWorker; // self.document is to verify we're not the SW ourself
152
152
  if (swContainer)
153
153
  swContainer.ready.then((registration) => (swHolder.registration = registration));
154
154
  if (typeof self !== 'undefined' && 'clients' in self && !self.document) {
@@ -182,7 +182,7 @@ class SWBroadcastChannel {
182
182
  // We're a service worker. Propagate to our browser clients.
183
183
  [...self['clients'].matchAll({ includeUncontrolled: true })].forEach((client) => client.postMessage({
184
184
  type: `sw-broadcast-${this.name}`,
185
- message
185
+ message,
186
186
  }));
187
187
  }
188
188
  else if (swHolder.registration) {
@@ -190,7 +190,7 @@ class SWBroadcastChannel {
190
190
  // Post to SW so it can repost to all its clients and to itself
191
191
  (_a = swHolder.registration.active) === null || _a === void 0 ? void 0 : _a.postMessage({
192
192
  type: `sw-broadcast-${this.name}`,
193
- message
193
+ message,
194
194
  });
195
195
  }
196
196
  }
@@ -5913,7 +5913,7 @@ function dexieCloud(dexie) {
5913
5913
  currentUserEmitter.next(UNAUTHORIZED_USER);
5914
5914
  });
5915
5915
  dexie.cloud = {
5916
- version: '4.0.1-beta.30',
5916
+ version: '4.0.1-beta.31',
5917
5917
  options: Object.assign({}, DEFAULT_OPTIONS),
5918
5918
  schema: null,
5919
5919
  get currentUserId() {
@@ -6168,7 +6168,7 @@ function dexieCloud(dexie) {
6168
6168
  });
6169
6169
  }
6170
6170
  }
6171
- dexieCloud.version = '4.0.1-beta.30';
6171
+ dexieCloud.version = '4.0.1-beta.31';
6172
6172
  Dexie.Cloud = dexieCloud;
6173
6173
 
6174
6174
  // In case the SW lives for a while, let it reuse already opened connections: