Skip to content

Commit

Permalink
Fixing axios#171, don't fail on error responses with json payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
Auke van Leeuwen committed Dec 14, 2015
1 parent f9c46c5 commit 0e4b339
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/adapters/xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module.exports = function xhrAdapter(resolve, reject, config) {
config: config
};
// Resolve or reject the Promise based on the status
((request.status >= 200 && request.status < 300) || (request.responseText && xDomain) ?
((request.status >= 200 && request.status < 300) || (xDomain && request.responseText) ?
resolve :
reject)(response);

Expand Down

0 comments on commit 0e4b339

Please sign in to comment.