Skip to content

Commit

Permalink
Merge pull request #174 from aukevanleeuwen/fix-for-issue-171
Browse files Browse the repository at this point in the history
Fixing #171, don't fail on error responses with json payloads
  • Loading branch information
mzabriskie committed Dec 14, 2015
2 parents 7140230 + 0e4b339 commit d127adf
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 d127adf

Please sign in to comment.