sindresorhus / got

🌐 Human-friendly and powerful HTTP request library for Node.js
MIT License
14.31k stars 936 forks source link

Fix: allow invalid arguments to throw appropriate Error message #2367

Closed Zen-cronic closed 4 months ago

Zen-cronic commented 4 months ago

Fixes: #2366

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