Skip to content

Commit

Permalink
Fix for FormData being null in node
Browse files Browse the repository at this point in the history
  • Loading branch information
zackify committed Apr 12, 2017
1 parent 02c22bc commit 0cdcbe2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "legible",
"version": "0.2.10",
"version": "0.2.11",
"description": "cleanly code your api requests",
"main": "dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default (body) => {
// Handle empty case
if (!body) return null
// Handle FormData
if (body instanceof FormData) return body
if (typeof FormData !== 'undefined' && body instanceof FormData) return body
try {
// Handle already stringified JSON
JSON.parse(body)
Expand Down

0 comments on commit 0cdcbe2

Please sign in to comment.