mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
Fixing issue #7
This commit is contained in:
@@ -52,12 +52,7 @@ module.exports = function httpAdapter(resolve, reject, config) {
|
||||
// Resolve or reject the Promise based on the status
|
||||
(res.statusCode >= 200 && res.statusCode < 300
|
||||
? resolve
|
||||
: reject)(
|
||||
response.data,
|
||||
response.status,
|
||||
response.headers,
|
||||
response.config
|
||||
);
|
||||
: reject)(response);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
+1
-6
@@ -44,12 +44,7 @@ module.exports = function xhrAdapter(resolve, reject, config) {
|
||||
// Resolve or reject the Promise based on the status
|
||||
(request.status >= 200 && request.status < 300
|
||||
? resolve
|
||||
: reject)(
|
||||
response.data,
|
||||
response.status,
|
||||
response.headers,
|
||||
response.config
|
||||
);
|
||||
: reject)(response);
|
||||
|
||||
// Clean up request
|
||||
request = null;
|
||||
|
||||
Reference in New Issue
Block a user