Skip to content

Commit

Permalink
fix(serializer): fixed serialization of array-like objects; (#5518)
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalBrainJS committed Feb 1, 2023
1 parent 7fbfbbe commit 08104c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/helpers/toFormData.js
Expand Up @@ -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);
Expand Down

0 comments on commit 08104c0

Please sign in to comment.