Skip to content

Commit f6ed49f

Browse files
committed
fix: router beforeResolve fullPath error
1 parent 32cacb3 commit f6ed49f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/client/src/router/createVueRouter.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ export const createVueRouter = (): Router => {
4040
// and save page data to route meta
4141
router.beforeResolve(async (to, from): Promise<string | void> => {
4242
if (to.path !== from.path || from === START_LOCATION) {
43-
const route = resolveRoute(to.fullPath)
43+
const fullPath = to.fullPath.split('#')[0]
44+
const route = resolveRoute(fullPath)
4445

45-
if (route.path !== to.fullPath) {
46+
if (route.path !== fullPath) {
4647
return route.path
4748
}
4849
const pageChunk = await route.loader()

0 commit comments

Comments
 (0)