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 => {
40
40
// and save page data to route meta
41
41
router . beforeResolve ( async ( to , from ) : Promise < string | void > => {
42
42
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 ) {
47
45
return route . path
48
46
}
49
47
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>(
16
16
currentPath ?: string ,
17
17
) : ResolvedRoute < T > => {
18
18
const routePath = resolveRoutePath ( path , currentPath )
19
- const route = routes . value [ routePath ] ?? {
19
+ const pathname = routePath . split ( / # | \? / ) [ 0 ]
20
+ const route = routes . value [ pathname ] ?? {
20
21
...routes . value [ '/404.html' ] ,
21
22
notFound : true ,
22
23
}
You can’t perform that action at this time.
0 commit comments