Skip to content

Commit

Permalink
Merge pull request #200 from dingziqi/master
Browse files Browse the repository at this point in the history
【bugfix】call originalAdapter instead of request in passThrough
  • Loading branch information
ctimmerm committed Jul 2, 2019
2 parents 4fcf05e + fdb32dd commit 082020c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/handle_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ function handleRequest(mockAdapter, resolve, reject, config) {

if (handler.length === 2) {
// passThrough handler
// tell axios to use the original adapter instead of our mock, fixes #35
config.adapter = mockAdapter.originalAdapter;
mockAdapter.axiosInstance.request(config).then(resolve, reject);
mockAdapter.originalAdapter(config).then(resolve, reject);
} else if (typeof handler[3] !== 'function') {
utils.settle(
resolve,
Expand Down

0 comments on commit 082020c

Please sign in to comment.