mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
fix(serializer): fixed serialization of array-like objects; (#5518)
This commit is contained in:
@@ -152,7 +152,7 @@ function toFormData(obj, formData, options) {
|
|||||||
value = JSON.stringify(value);
|
value = JSON.stringify(value);
|
||||||
} else if (
|
} else if (
|
||||||
(utils.isArray(value) && isFlatArray(value)) ||
|
(utils.isArray(value) && isFlatArray(value)) ||
|
||||||
(utils.isFileList(value) || utils.endsWith(key, '[]') && (arr = utils.toArray(value))
|
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
|
||||||
)) {
|
)) {
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
key = removeBrackets(key);
|
key = removeBrackets(key);
|
||||||
|
|||||||
Reference in New Issue
Block a user