2
0
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:
Dmitriy Mozgovoy
2023-02-01 20:38:59 +02:00
committed by GitHub
parent 7fbfbbeff6
commit 08104c028c
+1 -1
View File
@@ -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);