Skip to content

Commit

Permalink
chore: tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed May 24, 2024
1 parent 9458584 commit 2fa1f5f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/client/src/router/resolveRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ export const resolveRoute = <T extends RouteMeta = RouteMeta>(
path: string,
currentPath?: string,
): ResolvedRoute<T> => {
// get only the pathname from the path
const { pathname, hashAndQueries } = splitPath(path)

// resolve the route path
// calculate the route key and full path
const routeKey = resolveRouteKey(pathname, currentPath)
const routeFullPath = __VUEPRESS_CLEAN_URL__
? routeKey
: resolveRoutePathWithExt(routeKey) + hashAndQueries
const routeFullPath =
(__VUEPRESS_CLEAN_URL__ ? routeKey : resolveRoutePathWithExt(routeKey)) +
hashAndQueries

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

0 comments on commit 2fa1f5f

Please sign in to comment.