Skip to content

Commit a398e36

Browse files
committed
Revert init hooks not being called on empty options
This allows us to clone custom options before calling any other hooks
1 parent a5dd9aa commit a398e36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/create.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const create = (defaults: InstanceDefaults): Got => {
4848
});
4949

5050
// Got interface
51-
const got: Got = ((url: string | URL | OptionsInit | undefined, options?: OptionsInit, defaultOptions: Options = defaults.options): GotReturn => {
51+
const got: Got = ((url: string | URL | OptionsInit | undefined, options: OptionsInit = {}, defaultOptions: Options = defaults.options): GotReturn => {
5252
const request = new Request(url, options, defaultOptions);
5353
let promise: CancelableRequest | undefined;
5454

0 commit comments

Comments
 (0)