Skip to content

Commit

Permalink
fix: objectToFormData for undefined values (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
sahinvardar committed Jul 6, 2024
1 parent 6d8631f commit b2db8b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export function objectToFormData(obj: any) {
const value = flatObject[key];
if (Array.isArray(value)) {
value.forEach(v => formData.append(key, v.toString()));
} else if (value) {
} else if (value !== undefined) {
formData.append(key, value.toString());
}
}
Expand Down

0 comments on commit b2db8b5

Please sign in to comment.