Skip to content

Commit

Permalink
Strip out undefined headers during axios header normalization to not …
Browse files Browse the repository at this point in the history
…cause assertion errors
  • Loading branch information
marcbachmann committed Aug 5, 2024
1 parent 99cf5e9 commit e68e418
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handle_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function handleRequest(mockAdapter, resolve, reject, config) {
config.data,
config.params,
(config.headers && config.headers.constructor.name === 'AxiosHeaders')
? Object.assign({}, config.headers)
? Object.assign({}, config.headers.toJSON())
: config.headers,
config.baseURL
);
Expand Down

0 comments on commit e68e418

Please # to comment.