From 2fa1f5ffcb743651663b4a91dfb43cb824c7573a Mon Sep 17 00:00:00 2001 From: Mister-Hope Date: Fri, 24 May 2024 12:49:25 +0800 Subject: [PATCH] chore: tweaks --- packages/client/src/router/resolveRoute.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/client/src/router/resolveRoute.ts b/packages/client/src/router/resolveRoute.ts index c63be5763f..0bbb627016 100644 --- a/packages/client/src/router/resolveRoute.ts +++ b/packages/client/src/router/resolveRoute.ts @@ -16,14 +16,13 @@ export const resolveRoute = ( path: string, currentPath?: string, ): ResolvedRoute => { - // 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]) {