When invalid arguments are passed to the got function such as false, the new Options() returns undefined. But that option object is destructured without checking for it being undefined inside the got function.
Checklist
[x] I have read the documentation.
[x] I have included a pull request description of my changes.
Fixes: #2366
When invalid arguments are passed to the
got
function such asfalse
, thenew Options()
returns undefined. But that option object is destructured without checking for it beingundefined
inside the got function.Checklist