Skip to content

Commit

Permalink
fix data not null or undefined on get/patch requests
Browse files Browse the repository at this point in the history
  • Loading branch information
ThobyV committed Sep 15, 2020
1 parent e807b84 commit c132073
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
icp.response.use = icpType('response');

function request(opts) {
if (typeof opts === 'string') opts = { method: 'get', url: opts };
const url = defaults.baseUrl;
const config = icp.request.callback
? icp.request.callback(deepMerge({}, opts))
Expand All @@ -61,7 +60,6 @@
return function (url, data, config) {
if (!config) {
config = data;
data = null;
}
return request(deepMerge({ url, data, method }, config));
};
Expand Down

0 comments on commit c132073

Please sign in to comment.