File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/react-router/lib Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -403,7 +403,7 @@ function useNavigateUnstable(): NavigateFunction {
403403 if ( ! activeRef . current ) return ;
404404
405405 if ( typeof to === "number" ) {
406- if ( unstable_transitions ) {
406+ if ( unstable_transitions && ! options . flushSync ) {
407407 React . startTransition ( ( ) => navigator . go ( to ) ) ;
408408 } else {
409409 navigator . go ( to ) ;
@@ -431,7 +431,7 @@ function useNavigateUnstable(): NavigateFunction {
431431 : joinPaths ( [ basename , path . pathname ] ) ;
432432 }
433433
434- if ( unstable_transitions ) {
434+ if ( unstable_transitions && ! options . flushSync ) {
435435 React . startTransition ( ( ) => {
436436 if ( options . replace === true ) {
437437 navigator . replace ( path , options . state , options ) ;
@@ -1852,7 +1852,7 @@ function useNavigateStable(): NavigateFunction {
18521852 // is useless because we haven't wired up our router subscriber yet
18531853 if ( ! activeRef . current ) return ;
18541854
1855- if ( unstable_transitions ) {
1855+ if ( unstable_transitions && ! options . flushSync ) {
18561856 await new Promise < void > ( ( resolve , reject ) => {
18571857 // @ts -expect-error Needs React 19 types
18581858 React . startTransition ( async ( ) => {
You can’t perform that action at this time.
0 commit comments