Skip to content

Commit 0cdcbe2

Browse files
committed
Fix for FormData being null in node
1 parent 02c22bc commit 0cdcbe2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "legible",
3-
"version": "0.2.10",
3+
"version": "0.2.11",
44
"description": "cleanly code your api requests",
55
"main": "dist/index.js",
66
"scripts": {

src/utilities/body.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default (body) => {
22
// Handle empty case
33
if (!body) return null
44
// Handle FormData
5-
if (body instanceof FormData) return body
5+
if (typeof FormData !== 'undefined' && body instanceof FormData) return body
66
try {
77
// Handle already stringified JSON
88
JSON.parse(body)

0 commit comments

Comments
 (0)