diff --git a/README.md b/README.md index 9fa8cbc..ff8f085 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@
diff --git a/package.json b/package.json index 7d60897..0c15e56 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "unfetch", - "version": "3.1.1", + "version": "3.1.2", "description": "Bare minimum fetch polyfill in 500 bytes", "unpkg": "dist/unfetch.umd.js", "main": "dist/unfetch.js", diff --git a/src/index.d.ts b/src/index.d.ts index 0c53ad9..4a2ecdd 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -14,4 +14,4 @@ declare namespace unfetch { declare const unfetch: typeof fetch; -export default unfetch; +export = unfetch; diff --git a/src/index.js b/src/index.js index 934c7ce..e5f4f4c 100644 --- a/src/index.js +++ b/src/index.js @@ -17,7 +17,7 @@ export default typeof fetch=='function' ? fetch.bind() : function(url, options) request.onerror = reject; - request.send(options.body); + request.send(options.body || null); function response() { let keys = [],