Skip to content

Commit

Permalink
Fix(main): Allow object instead of path
Browse files Browse the repository at this point in the history
  • Loading branch information
fvdm committed Aug 12, 2016
1 parent 46b4d84 commit 2e7c233
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions openkvk.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ function apiRequest (path, params, callback) {
callback
};

if (typeof params === 'function') {
if (path instanceof Object) {
options.path = '';
options.params = path;
options.callback = params;
} else if (typeof params === 'function') {
options.params = null;
options.callback = params;
}

kvk (options, callback);
kvk (options);
return apiRequest;
}

Expand Down

0 comments on commit 2e7c233

Please sign in to comment.