@algolia/requester-browser-xhr
Advanced tools
Comparing version 4.0.0-beta.9 to 4.0.0-beta.10
@@ -24,8 +24,8 @@ 'use strict'; | ||
// eslint-disable-next-line functional/no-let | ||
let socketTimeout; | ||
let responseTimeout; | ||
// eslint-disable-next-line functional/immutable-data | ||
baseRequester.onreadystatechange = () => { | ||
if (baseRequester.readyState > baseRequester.OPENED && socketTimeout === undefined) { | ||
if (baseRequester.readyState > baseRequester.OPENED && responseTimeout === undefined) { | ||
clearTimeout(connectTimeout); | ||
socketTimeout = createTimeout(request.socketTimeout, 'Socket timeout'); | ||
responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout'); | ||
} | ||
@@ -38,3 +38,3 @@ }; | ||
clearTimeout(connectTimeout); | ||
clearTimeout(socketTimeout); | ||
clearTimeout(responseTimeout); | ||
resolve({ | ||
@@ -50,3 +50,3 @@ content: baseRequester.responseText || 'Network request failed', | ||
clearTimeout(connectTimeout); | ||
clearTimeout(socketTimeout); | ||
clearTimeout(responseTimeout); | ||
resolve({ | ||
@@ -53,0 +53,0 @@ content: baseRequester.responseText, |
@@ -20,8 +20,8 @@ function createBrowserXhrRequester() { | ||
// eslint-disable-next-line functional/no-let | ||
let socketTimeout; | ||
let responseTimeout; | ||
// eslint-disable-next-line functional/immutable-data | ||
baseRequester.onreadystatechange = () => { | ||
if (baseRequester.readyState > baseRequester.OPENED && socketTimeout === undefined) { | ||
if (baseRequester.readyState > baseRequester.OPENED && responseTimeout === undefined) { | ||
clearTimeout(connectTimeout); | ||
socketTimeout = createTimeout(request.socketTimeout, 'Socket timeout'); | ||
responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout'); | ||
} | ||
@@ -34,3 +34,3 @@ }; | ||
clearTimeout(connectTimeout); | ||
clearTimeout(socketTimeout); | ||
clearTimeout(responseTimeout); | ||
resolve({ | ||
@@ -46,3 +46,3 @@ content: baseRequester.responseText || 'Network request failed', | ||
clearTimeout(connectTimeout); | ||
clearTimeout(socketTimeout); | ||
clearTimeout(responseTimeout); | ||
resolve({ | ||
@@ -49,0 +49,0 @@ content: baseRequester.responseText, |
{ | ||
"name": "@algolia/requester-browser-xhr", | ||
"version": "4.0.0-beta.9", | ||
"version": "4.0.0-beta.10", | ||
"private": false, | ||
@@ -16,4 +16,4 @@ "description": "Promise-based request library for browser using xhr.", | ||
"dependencies": { | ||
"@algolia/requester-common": "4.0.0-beta.9" | ||
"@algolia/requester-common": "4.0.0-beta.10" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6144
+ Added@algolia/requester-common@4.0.0-beta.10(transitive)
- Removed@algolia/requester-common@4.0.0-beta.9(transitive)