Skip to content

Commit cd1b82b

Browse files
emilbroman-eqtjasonsaayman
andauthoredDec 22, 2021
Removing code relying on strict mode behaviour for arguments (#3470)
Co-authored-by: Jay <jasonsaayman@gmail.com>
1 parent 55e6577 commit cd1b82b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎lib/core/Axios.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ function Axios(instanceConfig) {
2626
*
2727
* @param {Object} config The config specific for this request (merged with this.defaults)
2828
*/
29-
Axios.prototype.request = function request(config) {
29+
Axios.prototype.request = function request(configOrUrl, config) {
3030
/*eslint no-param-reassign:0*/
3131
// Allow for axios('example/url'[, config]) a la fetch API
32-
if (typeof config === 'string') {
33-
config = arguments[1] || {};
34-
config.url = arguments[0];
35-
} else {
32+
if (typeof configOrUrl === 'string') {
3633
config = config || {};
34+
config.url = configOrUrl;
35+
} else {
36+
config = configOrUrl || {};
3737
}
3838

3939
config = mergeConfig(this.defaults, config);

0 commit comments

Comments
 (0)
Please sign in to comment.