set option if not defined
This commit is contained in:
parent
648f12a1eb
commit
ab5ee770b8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user