File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
packages/react-router/lib/router Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1553,14 +1553,15 @@ export function createRouter(init: RouterInit): Router {
15531553 let flushSync = ( opts && opts . flushSync ) === true ;
15541554
15551555 // Short circuit if it's only a hash change and not a revalidation or
1556- // mutation submission.
1556+ // mutation submission (or a potential navigation/revalidation to clear errors) .
15571557 //
15581558 // Ignore on initial page loads because since the initial hydration will always
15591559 // be "same hash". For example, on /page#hash and submit a <Form method="post">
15601560 // which will default to a navigation to /page
15611561 if (
15621562 matches &&
15631563 state . initialized &&
1564+ ! state . errors &&
15641565 ! isRevalidationRequired &&
15651566 isHashChangeOnly ( state . location , location ) &&
15661567 ! ( opts && opts . submission && isMutationMethod ( opts . submission . formMethod ) )
You can’t perform that action at this time.
0 commit comments