Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2fa1f5f

Browse files
committedMay 24, 2024
chore: tweaks
1 parent 9458584 commit 2fa1f5f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed
 

‎packages/client/src/router/resolveRoute.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ export const resolveRoute = <T extends RouteMeta = RouteMeta>(
1616
path: string,
1717
currentPath?: string,
1818
): ResolvedRoute<T> => {
19-
// get only the pathname from the path
2019
const { pathname, hashAndQueries } = splitPath(path)
2120

22-
// resolve the route path
21+
// calculate the route key and full path
2322
const routeKey = resolveRouteKey(pathname, currentPath)
24-
const routeFullPath = __VUEPRESS_CLEAN_URL__
25-
? routeKey
26-
: resolveRoutePathWithExt(routeKey) + hashAndQueries
23+
const routeFullPath =
24+
(__VUEPRESS_CLEAN_URL__ ? routeKey : resolveRoutePathWithExt(routeKey)) +
25+
hashAndQueries
2726

2827
// the route not found
2928
if (!routes.value[routeKey]) {

0 commit comments

Comments
 (0)
Please sign in to comment.