Skip to content

Commit 186e8ab

Browse files
mehwwwyyx990803
authored andcommitted
Use replace instead of push in init render (#52)
#51
1 parent 8bc28b0 commit 186e8ab

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ exports.sync = function (store, router, options) {
2121
return
2222
}
2323
isTimeTraveling = true
24+
if (!currentPath) {
25+
router.replace(route)
26+
} else {
27+
router.push(route)
28+
}
2429
currentPath = route.fullPath
25-
router.push(route)
2630
},
2731
{ sync: true }
2832
)

0 commit comments

Comments
 (0)