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.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * ==========================================================================
10
10
  *
11
- * Version 4.0.0-beta.23, Mon Oct 17 2022
11
+ * Version 4.0.0-beta.24, Mon Oct 17 2022
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -5481,13 +5481,26 @@ class LoginGui extends d$1 {
5481
5481
  }
5482
5482
  }
5483
5483
  function setupDefaultGUI(db) {
5484
- const el = document.createElement('div');
5485
- document.body.appendChild(el);
5486
- P(h(LoginGui, { db: db.vip }), el);
5487
5484
  let closed = false;
5485
+ const el = document.createElement('div');
5486
+ if (document.body) {
5487
+ document.body.appendChild(el);
5488
+ P(h(LoginGui, { db: db.vip }), el);
5489
+ }
5490
+ else {
5491
+ addEventListener('DOMContentLoaded', () => {
5492
+ if (!closed) {
5493
+ document.body.appendChild(el);
5494
+ P(h(LoginGui, { db: db.vip }), el);
5495
+ }
5496
+ });
5497
+ }
5488
5498
  return {
5489
5499
  unsubscribe() {
5490
- el.remove();
5500
+ try {
5501
+ el.remove();
5502
+ }
5503
+ catch (_a) { }
5491
5504
  closed = true;
5492
5505
  },
5493
5506
  get closed() {
@@ -5909,7 +5922,7 @@ function dexieCloud(dexie) {
5909
5922
  currentUserEmitter.next(UNAUTHORIZED_USER);
5910
5923
  });
5911
5924
  dexie.cloud = {
5912
- version: '4.0.0-beta.23',
5925
+ version: '4.0.0-beta.24',
5913
5926
  options: Object.assign({}, DEFAULT_OPTIONS),
5914
5927
  schema: null,
5915
5928
  get currentUserId() {
@@ -6162,7 +6175,7 @@ function dexieCloud(dexie) {
6162
6175
  });
6163
6176
  }
6164
6177
  }
6165
- dexieCloud.version = '4.0.0-beta.23';
6178
+ dexieCloud.version = '4.0.0-beta.24';
6166
6179
  Dexie.Cloud = dexieCloud;
6167
6180
 
6168
6181
  export { dexieCloud as default, dexieCloud, getTiedObjectId, getTiedRealmId };