Skip to content

Commit

Permalink
Merge pull request #58 from BonnierNews/fix/remove-unused-parameter
Browse files Browse the repository at this point in the history
Remove unused parameter
  • Loading branch information
Daghall authored Sep 24, 2024
2 parents ac53855 + a0d6f05 commit 2885ac1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function buildFetch(behavior) {
return resolvedCallback(null, cacheValueFn(content, res.headers, res.statusCode), maxAge);
}

function handleRedirect(url, cacheKey, res, body, resolvedCallback) {
function handleRedirect(cacheKey, res, body, resolvedCallback) {
const maxAge = maxAgeFn(getMaxAge(res.headers["cache-control"]), cacheKey, res, body);

const content = {
Expand Down Expand Up @@ -211,7 +211,7 @@ function buildFetch(behavior) {
}

return request(options).then((res) => {
if (isRedirect(res)) return handleRedirect(url, cacheKey, res, res.body, resolvedCallback);
if (isRedirect(res)) return handleRedirect(cacheKey, res, res.body, resolvedCallback);
return parseResponse(res.body, contentType, (_, transformed) => {
return handleSuccess(url, cacheKey, res, transformed, resolvedCallback);
});
Expand Down

0 comments on commit 2885ac1

Please sign in to comment.