@escapenavigator/utils 1.10.151 → 1.10.152
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.
|
@@ -138,8 +138,7 @@ function classifyApiError(ctx) {
|
|
|
138
138
|
// code === 'ERR_NETWORK' (axios>=0.27). На проде это почти всегда
|
|
139
139
|
// клиентская связность (мобильный обрыв, смена соты, троттлинг/RKN).
|
|
140
140
|
// На виджете GET'ы уже ретраятся — сюда долетает только финальный фейл.
|
|
141
|
-
const isNetworkError = !status &&
|
|
142
|
-
(code === 'ERR_NETWORK' || (!code && isNetworkErrorMessage(message)));
|
|
141
|
+
const isNetworkError = !status && (code === 'ERR_NETWORK' || (!code && isNetworkErrorMessage(message)));
|
|
143
142
|
if (isNetworkError) {
|
|
144
143
|
return {
|
|
145
144
|
severity: 'business',
|
|
@@ -42,10 +42,7 @@ function getBrowserPhoneCountry() {
|
|
|
42
42
|
if (typeof navigator === 'undefined') {
|
|
43
43
|
return null;
|
|
44
44
|
}
|
|
45
|
-
const candidates = [
|
|
46
|
-
...(navigator.languages ?? []),
|
|
47
|
-
navigator.language,
|
|
48
|
-
].filter(Boolean);
|
|
45
|
+
const candidates = [...(navigator.languages ?? []), navigator.language].filter(Boolean);
|
|
49
46
|
for (const candidate of candidates) {
|
|
50
47
|
const country = regionFromLocaleTag(candidate);
|
|
51
48
|
if (country) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@escapenavigator/utils",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.152",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"test": "jest"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@escapenavigator/types": "^1.10.
|
|
17
|
+
"@escapenavigator/types": "^1.10.147",
|
|
18
18
|
"axios": "^0.21.4",
|
|
19
19
|
"class-transformer": "^0.5.1",
|
|
20
20
|
"class-validator": "^0.13.2",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"ts-jest": "^29.1.1",
|
|
29
29
|
"typescript": "^5.6"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "ad97abd6bd58ad005be9ec0951a78db2c83a97f3"
|
|
32
32
|
}
|