set option if not defined

This commit is contained in:
Etienne Prothon 2020-06-16 15:02:27 +02:00
parent 648f12a1eb
commit ab5ee770b8

View File

@ -38,6 +38,7 @@ async function fetch(cookieJars, url, options) {
const wantFollow = !options || !options.redirect || options.redirect === 'follow';
if(wantFollow) {
if (!options) options = {};
options.redirect = 'manual';
}
const result = await _fetch(url, options);