dev-classes 1.5.4 → 1.5.5

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -16
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2697,21 +2697,9 @@ class NetworkStatusTracker {
2697
2697
  offline: new AbortController(),
2698
2698
  change: new AbortController()
2699
2699
  };
2700
- this.setControllersEvents(i), window.addEventListener(
2701
- "online",
2702
- () => {
2703
- this.updateState(!0, e);
2704
- },
2705
- { signal: (a = i.online) == null ? void 0 : a.signal }
2706
- ), window.addEventListener(
2707
- "offline",
2708
- () => {
2709
- this.updateState(!1, e);
2710
- },
2711
- { signal: (u = i.offline) == null ? void 0 : u.signal }
2712
- );
2700
+ this.setControllersEvents(i);
2713
2701
  const o = this.getConnection();
2714
- o && (o != null && o.addEventListener) && o.addEventListener(
2702
+ o && (o != null && o.addEventListener) ? o.addEventListener(
2715
2703
  "change",
2716
2704
  async (f) => {
2717
2705
  if (this.listUrls.length > 0)
@@ -2721,8 +2709,20 @@ class NetworkStatusTracker {
2721
2709
  this.updateState(m, e);
2722
2710
  }
2723
2711
  },
2724
- { signal: (l = i.change) == null ? void 0 : l.signal }
2725
- ), t();
2712
+ { signal: (a = i.change) == null ? void 0 : a.signal }
2713
+ ) : (window.addEventListener(
2714
+ "online",
2715
+ () => {
2716
+ this.updateState(!0, e);
2717
+ },
2718
+ { signal: (u = i.online) == null ? void 0 : u.signal }
2719
+ ), window.addEventListener(
2720
+ "offline",
2721
+ () => {
2722
+ this.updateState(!1, e);
2723
+ },
2724
+ { signal: (l = i.offline) == null ? void 0 : l.signal }
2725
+ )), t();
2726
2726
  });
2727
2727
  });
2728
2728
  }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "url": "git+https://github.com/SinGlEBW/dev-classes.git"
12
12
  },
13
13
  "license": "MIT",
14
- "version": "1.5.4",
14
+ "version": "1.5.5",
15
15
  "type": "module",
16
16
  "module": "./dist/index.js",
17
17
  "main": "./dist/index.js",