diff --git a/packages/react-router/src/Transitioner.tsx b/packages/react-router/src/Transitioner.tsx index 227f1a45b8..d38a8ca36d 100644 --- a/packages/react-router/src/Transitioner.tsx +++ b/packages/react-router/src/Transitioner.tsx @@ -84,7 +84,7 @@ export function Transitioner() { if (previousIsLoading && !routerState.isLoading) { const toLocation = router.state.location const fromLocation = router.state.resolvedLocation - const pathChanged = fromLocation.href !== toLocation.href + const pathChanged = fromLocation.pathname !== toLocation.pathname router.emit({ type: 'onLoad', // When the new URL has committed, when the new matches have been loaded into state.matches @@ -116,7 +116,7 @@ export function Transitioner() { if (previousIsAnyPending && !isAnyPending) { const toLocation = router.state.location const fromLocation = router.state.resolvedLocation - const pathChanged = fromLocation.href !== toLocation.href + const pathChanged = fromLocation.pathname !== toLocation.pathname router.emit({ type: 'onResolved',