react-native-update 10.27.0 → 10.27.1

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/package.json +1 -1
  2. package/src/utils.ts +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update",
3
- "version": "10.27.0",
3
+ "version": "10.27.1",
4
4
  "description": "react-native hot update",
5
5
  "main": "src/index",
6
6
  "scripts": {
package/src/utils.ts CHANGED
@@ -49,16 +49,16 @@ const ping =
49
49
  return url;
50
50
  }
51
51
  log('ping failed', url, status, statusText);
52
- return null;
52
+ throw new Error('Ping failed');
53
53
  })
54
54
  .catch(e => {
55
55
  pingFinished = true;
56
56
  log('ping error', url, e);
57
- return null;
57
+ throw e;
58
58
  }),
59
- new Promise(r =>
59
+ new Promise((_, reject) =>
60
60
  setTimeout(() => {
61
- r(null);
61
+ reject(new Error('Ping timeout'));
62
62
  if (!pingFinished) {
63
63
  log('ping timeout', url);
64
64
  }