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.
@@ -5488,13 +5488,26 @@
5488
5488
  }
5489
5489
  }
5490
5490
  function setupDefaultGUI(db) {
5491
- const el = document.createElement('div');
5492
- document.body.appendChild(el);
5493
- P(h(LoginGui, { db: db.vip }), el);
5494
5491
  let closed = false;
5492
+ const el = document.createElement('div');
5493
+ if (document.body) {
5494
+ document.body.appendChild(el);
5495
+ P(h(LoginGui, { db: db.vip }), el);
5496
+ }
5497
+ else {
5498
+ addEventListener('DOMContentLoaded', () => {
5499
+ if (!closed) {
5500
+ document.body.appendChild(el);
5501
+ P(h(LoginGui, { db: db.vip }), el);
5502
+ }
5503
+ });
5504
+ }
5495
5505
  return {
5496
5506
  unsubscribe() {
5497
- el.remove();
5507
+ try {
5508
+ el.remove();
5509
+ }
5510
+ catch (_a) { }
5498
5511
  closed = true;
5499
5512
  },
5500
5513
  get closed() {