2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-11 18:02:32 +03:00

fix array params

This commit is contained in:
Maximilian Hoffmann
2015-05-27 13:32:34 +02:00
parent 1629a026da
commit 594df987f2
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -29,6 +29,11 @@ module.exports = function buildUrl(url, params) {
if (val === null || typeof val === 'undefined') {
return;
}
if (utils.isArray(val)) {
key = key+'[]';
}
if (!utils.isArray(val)) {
val = [val];
}