Skip to content

Commit 7297db5

Browse files
committed
perf: tweaks
1 parent ab3d6e6 commit 7297db5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/client/src/components/RouteLink.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { removeLeadingSlash } from '@vuepress/shared'
21
import { computed, defineComponent, h } from 'vue'
32
import type { SlotsType, VNode } from 'vue'
43
import { useRoute, useRouter } from 'vue-router'
@@ -92,7 +91,7 @@ export const RouteLink = defineComponent({
9291
const path = computed(() =>
9392
props.to.startsWith('#') || props.to.startsWith('?')
9493
? props.to
95-
: `${__VUEPRESS_BASE__}${removeLeadingSlash(resolveRoutePath(props.to, route.path))}`,
94+
: `${__VUEPRESS_BASE__}${resolveRoutePath(props.to, route.path).substring(1)}`,
9695
)
9796

9897
return () =>

0 commit comments

Comments
 (0)