@anfenn/dync 1.0.16 → 1.0.18

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Dync
3
- } from "../chunk-NJF2KCLA.js";
3
+ } from "../chunk-WZ7V4U6Z.js";
4
4
  import "../chunk-SQB6E7V2.js";
5
5
 
6
6
  // src/react/useDync.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anfenn/dync",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "private": false,
5
5
  "description": "Write once, run IndexedDB & SQLite with sync anywhere - React, React Native, Expo, Capacitor, Electron & Node.js",
6
6
  "keywords": [
package/src/helpers.ts CHANGED
@@ -24,7 +24,7 @@ function isNetworkError(error: any): boolean {
24
24
  const name = error.name;
25
25
 
26
26
  // fetch: throws TypeError on network failure
27
- if (name === 'TypeError' && (message.includes('failed to fetch') || message.includes('network request failed'))) {
27
+ if (message.includes('failed to fetch') || message.includes('network request failed')) {
28
28
  return true;
29
29
  }
30
30