Skip to content

Commit 2fa1f5f

Browse files
committed
chore: tweaks
1 parent 9458584 commit 2fa1f5f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Diff for: packages/client/src/router/resolveRoute.ts

+4-5
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)