File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
packages/client/src/router Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,8 @@ 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 fullPath = to . fullPath . split ( / # | \? / ) [ 0 ]
44- const route = resolveRoute ( fullPath )
45-
46- if ( route . path !== fullPath ) {
43+ const route = resolveRoute ( to . fullPath )
44+ if ( route . path !== to . fullPath ) {
4745 return route . path
4846 }
4947 const pageChunk = await route . loader ( )
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ export const resolveRoute = <T extends RouteMeta = RouteMeta>(
1616 currentPath ?: string ,
1717) : ResolvedRoute < T > => {
1818 const routePath = resolveRoutePath ( path , currentPath )
19- const route = routes . value [ routePath ] ?? {
19+ const pathname = routePath . split ( / # | \? / ) [ 0 ]
20+ const route = routes . value [ pathname ] ?? {
2021 ...routes . value [ '/404.html' ] ,
2122 notFound : true ,
2223 }
You can’t perform that action at this time.
0 commit comments