dexie-cloud-addon 4.0.0-beta.23 → 4.0.0-beta.24

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.
@@ -5463,13 +5463,26 @@ class LoginGui extends d$1 {
5463
5463
  }
5464
5464
  }
5465
5465
  function setupDefaultGUI(db) {
5466
- const el = document.createElement('div');
5467
- document.body.appendChild(el);
5468
- P(h(LoginGui, { db: db.vip }), el);
5469
5466
  let closed = false;
5467
+ const el = document.createElement('div');
5468
+ if (document.body) {
5469
+ document.body.appendChild(el);
5470
+ P(h(LoginGui, { db: db.vip }), el);
5471
+ }
5472
+ else {
5473
+ addEventListener('DOMContentLoaded', () => {
5474
+ if (!closed) {
5475
+ document.body.appendChild(el);
5476
+ P(h(LoginGui, { db: db.vip }), el);
5477
+ }
5478
+ });
5479
+ }
5470
5480
  return {
5471
5481
  unsubscribe() {
5472
- el.remove();
5482
+ try {
5483
+ el.remove();
5484
+ }
5485
+ catch (_a) { }
5473
5486
  closed = true;
5474
5487
  },
5475
5488
  get closed() {
@@ -5884,7 +5897,7 @@ function dexieCloud(dexie) {
5884
5897
  currentUserEmitter.next(UNAUTHORIZED_USER);
5885
5898
  });
5886
5899
  dexie.cloud = {
5887
- version: '4.0.0-beta.23',
5900
+ version: '4.0.0-beta.24',
5888
5901
  options: Object.assign({}, DEFAULT_OPTIONS),
5889
5902
  schema: null,
5890
5903
  get currentUserId() {
@@ -6137,7 +6150,7 @@ function dexieCloud(dexie) {
6137
6150
  });
6138
6151
  }
6139
6152
  }
6140
- dexieCloud.version = '4.0.0-beta.23';
6153
+ dexieCloud.version = '4.0.0-beta.24';
6141
6154
  Dexie.Cloud = dexieCloud;
6142
6155
 
6143
6156
  // In case the SW lives for a while, let it reuse already opened connections: