Skip to content

Commit

Permalink
Small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
szmarczak committed Feb 17, 2020
1 parent 4f52768 commit 8dc4518
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/client-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ClientRequest extends Writable {
input = urlToOptions(input instanceof URL ? input : new URL(input));
}

if (typeof options === 'function') {
if (typeof options === 'function' || options === undefined) {
// (options, callback)
callback = options;
options = hasInput ? input : {...input};
Expand Down

0 comments on commit 8dc4518

Please sign in to comment.