Skip to content

Commit

Permalink
Removing code relying on strict mode behaviour for arguments (#3470)
Browse files Browse the repository at this point in the history
Co-authored-by: Jay <jasonsaayman@gmail.com>
  • Loading branch information
emilbroman-eqt and jasonsaayman committed Dec 22, 2021
1 parent 55e6577 commit cd1b82b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/core/Axios.js
Expand Up @@ -26,14 +26,14 @@ function Axios(instanceConfig) {
*
* @param {Object} config The config specific for this request (merged with this.defaults)
*/
Axios.prototype.request = function request(config) {
Axios.prototype.request = function request(configOrUrl, config) {
/*eslint no-param-reassign:0*/
// Allow for axios('example/url'[, config]) a la fetch API
if (typeof config === 'string') {
config = arguments[1] || {};
config.url = arguments[0];
} else {
if (typeof configOrUrl === 'string') {
config = config || {};
config.url = configOrUrl;
} else {
config = configOrUrl || {};
}

config = mergeConfig(this.defaults, config);
Expand Down

0 comments on commit cd1b82b

Please sign in to comment.