@leofcoin/chain 1.7.108 → 1.7.109
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.
- package/exports/browser/chain.js +2 -5
- package/exports/chain.js +2 -5
- package/package.json +1 -1
package/exports/browser/chain.js
CHANGED
|
@@ -5456,11 +5456,8 @@ class ConnectionMonitor {
|
|
|
5456
5456
|
// lightweight TCP probe to detect internet connectivity in Node.js
|
|
5457
5457
|
async #isOnLine(timeout = 1500) {
|
|
5458
5458
|
// If not running in Node, fallback to navigator.onLine if available, otherwise assume online
|
|
5459
|
-
if (
|
|
5460
|
-
|
|
5461
|
-
return navigator.onLine;
|
|
5462
|
-
}
|
|
5463
|
-
return true;
|
|
5459
|
+
if (navigator?.onLine !== undefined) {
|
|
5460
|
+
return navigator.onLine;
|
|
5464
5461
|
}
|
|
5465
5462
|
return new Promise(async (resolve) => {
|
|
5466
5463
|
try {
|
package/exports/chain.js
CHANGED
|
@@ -1583,11 +1583,8 @@ class ConnectionMonitor {
|
|
|
1583
1583
|
// lightweight TCP probe to detect internet connectivity in Node.js
|
|
1584
1584
|
async #isOnLine(timeout = 1500) {
|
|
1585
1585
|
// If not running in Node, fallback to navigator.onLine if available, otherwise assume online
|
|
1586
|
-
if (
|
|
1587
|
-
|
|
1588
|
-
return navigator.onLine;
|
|
1589
|
-
}
|
|
1590
|
-
return true;
|
|
1586
|
+
if (navigator?.onLine !== undefined) {
|
|
1587
|
+
return navigator.onLine;
|
|
1591
1588
|
}
|
|
1592
1589
|
return new Promise(async (resolve) => {
|
|
1593
1590
|
try {
|