mirror of
https://github.com/tenrok/axios.git
synced 2026-06-05 16:42:32 +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);
|
||||
} else if (
|
||||
(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
|
||||
key = removeBrackets(key);
|
||||
|
||||
Reference in New Issue
Block a user