File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/react-router/src Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1959,8 +1959,11 @@ export class Router<
1959
1959
try {
1960
1960
const next = this . latestLocation
1961
1961
const prevLocation = this . state . resolvedLocation
1962
+ const actualBrowserLocation = this . state . location
1962
1963
const hrefChanged = prevLocation . href !== next . href
1963
1964
const pathChanged = prevLocation . pathname !== next . pathname
1965
+ const browserLocationChanged =
1966
+ actualBrowserLocation . href !== next . href
1964
1967
1965
1968
// Cancel any pending matches
1966
1969
this . cancelMatches ( )
@@ -2047,9 +2050,10 @@ export class Router<
2047
2050
isLoading : false ,
2048
2051
loadedAt : Date . now ( ) ,
2049
2052
matches : newMatches ,
2050
- pendingMatches : hasPendingFetches
2051
- ? s . pendingMatches
2052
- : undefined ,
2053
+ pendingMatches :
2054
+ hasPendingFetches && browserLocationChanged
2055
+ ? s . pendingMatches
2056
+ : undefined ,
2053
2057
cachedMatches : [
2054
2058
...s . cachedMatches ,
2055
2059
...exitingMatches . filter ( ( d ) => d . status !== 'error' ) ,
You can’t perform that action at this time.
0 commit comments