diff --git a/src/index.mjs b/src/index.mjs index 6e63ab2..c55a460 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -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);