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.
@@ -5470,13 +5470,26 @@
5470
5470
  }
5471
5471
  }
5472
5472
  function setupDefaultGUI(db) {
5473
- const el = document.createElement('div');
5474
- document.body.appendChild(el);
5475
- P(h(LoginGui, { db: db.vip }), el);
5476
5473
  let closed = false;
5474
+ const el = document.createElement('div');
5475
+ if (document.body) {
5476
+ document.body.appendChild(el);
5477
+ P(h(LoginGui, { db: db.vip }), el);
5478
+ }
5479
+ else {
5480
+ addEventListener('DOMContentLoaded', () => {
5481
+ if (!closed) {
5482
+ document.body.appendChild(el);
5483
+ P(h(LoginGui, { db: db.vip }), el);
5484
+ }
5485
+ });
5486
+ }
5477
5487
  return {
5478
5488
  unsubscribe() {
5479
- el.remove();
5489
+ try {
5490
+ el.remove();
5491
+ }
5492
+ catch (_a) { }
5480
5493
  closed = true;
5481
5494
  },
5482
5495
  get closed() {
@@ -5891,7 +5904,7 @@
5891
5904
  currentUserEmitter.next(UNAUTHORIZED_USER);
5892
5905
  });
5893
5906
  dexie.cloud = {
5894
- version: '4.0.0-beta.23',
5907
+ version: '4.0.0-beta.24',
5895
5908
  options: Object.assign({}, DEFAULT_OPTIONS),
5896
5909
  schema: null,
5897
5910
  get currentUserId() {
@@ -6144,7 +6157,7 @@
6144
6157
  });
6145
6158
  }
6146
6159
  }
6147
- dexieCloud.version = '4.0.0-beta.23';
6160
+ dexieCloud.version = '4.0.0-beta.24';
6148
6161
  Dexie__default["default"].Cloud = dexieCloud;
6149
6162
 
6150
6163
  // In case the SW lives for a while, let it reuse already opened connections: