Skip to content

Commit a666ed2

Browse files
committed
Revert "Move redirect short circuit upwards"
This reverts commit b080bfe.
1 parent 069f069 commit a666ed2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/router/router.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3395,11 +3395,6 @@ function getMatchesToLoad(
33953395
return;
33963396
}
33973397

3398-
// Don't revalidate an actively redirecting fetcher
3399-
if (fetchRedirectIds.has(key)) {
3400-
return;
3401-
}
3402-
34033398
let fetcherMatches = matchRoutes(routesToUse, f.path, basename);
34043399

34053400
// If the fetcher path no longer matches, push it in with null matches so
@@ -3425,7 +3420,10 @@ function getMatchesToLoad(
34253420
let fetcherMatch = getTargetMatch(fetcherMatches, f.path);
34263421

34273422
let shouldRevalidate = false;
3428-
if (cancelledFetcherLoads.includes(key)) {
3423+
if (fetchRedirectIds.has(key)) {
3424+
// Never trigger a revalidation of an actively redirecting fetcher
3425+
shouldRevalidate = false;
3426+
} else if (cancelledFetcherLoads.includes(key)) {
34293427
// Always revalidate if the fetcher was cancelled
34303428
shouldRevalidate = true;
34313429
} else if (

0 commit comments

Comments
 (0)