File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
packages/router/src/navigation-api Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ export function createNavigationApiRouter(options: RouterApiOptions): Router {
78
78
START_LOCATION_NORMALIZED
79
79
)
80
80
81
+ let isRevertingNavigation = false
81
82
let pendingLocation : RouteLocation | undefined
82
83
let lastSuccessfulLocation : RouteLocationNormalizedLoaded =
83
84
START_LOCATION_NORMALIZED
@@ -657,6 +658,11 @@ export function createNavigationApiRouter(options: RouterApiOptions): Router {
657
658
async function handleCurrentEntryChange (
658
659
event : NavigationCurrentEntryChangeEvent
659
660
) {
661
+ if ( isRevertingNavigation ) {
662
+ isRevertingNavigation = false
663
+ return
664
+ }
665
+
660
666
if ( event . navigationType !== 'traverse' ) {
661
667
return
662
668
}
@@ -686,6 +692,7 @@ export function createNavigationApiRouter(options: RouterApiOptions): Router {
686
692
} catch ( error ) {
687
693
const failure = error as NavigationFailure
688
694
695
+ isRevertingNavigation = true
689
696
go ( fromIndex - toIndex )
690
697
691
698
finalizeNavigation ( from , to , failure )
You can’t perform that action at this time.
0 commit comments