mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Update buildURL.js
Two if statements is unnecessary, we can replace with "if ... else ..."
This commit is contained in:
@@ -41,9 +41,7 @@ module.exports = function buildURL(url, params, paramsSerializer) {
|
|||||||
|
|
||||||
if (utils.isArray(val)) {
|
if (utils.isArray(val)) {
|
||||||
key = key + '[]';
|
key = key + '[]';
|
||||||
}
|
} else {
|
||||||
|
|
||||||
if (!utils.isArray(val)) {
|
|
||||||
val = [val];
|
val = [val];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user