Skip to content

Commit

Permalink
fix: route resolve error
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhanbo committed May 19, 2024
1 parent f6ed49f commit de2fa24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/client/src/router/createVueRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export const createVueRouter = (): Router => {
// and save page data to route meta
router.beforeResolve(async (to, from): Promise<string | void> => {
if (to.path !== from.path || from === START_LOCATION) {
const fullPath = to.fullPath.split('#')[0]
console.log(to)
const fullPath = to.fullPath.split(/#|\?/)[0]
const route = resolveRoute(fullPath)

if (route.path !== fullPath) {
Expand Down

0 comments on commit de2fa24

Please sign in to comment.