@escapenavigator/hooks 2.0.35 → 2.0.36

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.
@@ -120,6 +120,16 @@ function lazyWithRetry(factory) {
120
120
  catch (secondError) {
121
121
  if (!(0, is_stale_chunk_error_1.isRecoverableImportError)(secondError))
122
122
  throw secondError;
123
+ // Оффлайн (мобильный интернет в метро, iOS Safari) выглядит для
124
+ // `import()` так же, как исчезнувший чанк. Reload тут даст
125
+ // браузерную страницу «нет сети», а ChunkRecoveryFailedError —
126
+ // ложную тревогу «битый деплой» в Sentry
127
+ // (ESCAPE-NAVIGATOR-ORDERS-10). Отдаём исходную ошибку: её
128
+ // формулировка стоит в `ignoreErrors`, а ErrorBoundary покажет
129
+ // экран с кнопкой «Обновить».
130
+ if (typeof navigator !== 'undefined' && navigator.onLine === false) {
131
+ throw secondError;
132
+ }
123
133
  if (reloadOnce() !== 'exhausted') {
124
134
  // Страница уходит в reload — «подвешиваем» lazy навсегда,
125
135
  // чтобы Suspense-лоадер висел до перезагрузки вместо
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/hooks",
3
- "version": "2.0.35",
3
+ "version": "2.0.36",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -14,9 +14,9 @@
14
14
  "test": "jest"
15
15
  },
16
16
  "dependencies": {
17
- "@escapenavigator/services": "^2.0.35",
18
- "@escapenavigator/types": "^2.0.33",
19
- "@escapenavigator/utils": "^2.0.35",
17
+ "@escapenavigator/services": "^2.0.36",
18
+ "@escapenavigator/types": "^2.0.34",
19
+ "@escapenavigator/utils": "^2.0.36",
20
20
  "libphonenumber-js": "^1.12.24",
21
21
  "react": "19.2.6",
22
22
  "react-phone-input-2": "^2.15.1"
@@ -32,5 +32,5 @@
32
32
  "ts-jest": "^29.1.1",
33
33
  "typescript": "^5.6"
34
34
  },
35
- "gitHead": "2c47385d8e152226b70a9b11213eb511b671ad0f"
35
+ "gitHead": "3112d9d954979e406e77a787d459e16c49da3d5a"
36
36
  }