diff --git a/docs/.vitepress/vitepress/components/navbar/vp-search.vue b/docs/.vitepress/vitepress/components/navbar/vp-search.vue index 8020861b8b..1eab8da1a3 100644 --- a/docs/.vitepress/vitepress/components/navbar/vp-search.vue +++ b/docs/.vitepress/vitepress/components/navbar/vp-search.vue @@ -72,19 +72,19 @@ function initialize(userOptions: any) { // }), navigator: { - navigate: ({ suggestionUrl }: { suggestionUrl: string }) => { + navigate: ({ itemUrl }: { itemUrl: string }) => { if (!isClient) return const { pathname: hitPathname } = new URL( - window.location.origin + suggestionUrl + window.location.origin + itemUrl ) // Router doesn't handle same-page navigation so we use the native // browser location API for anchor navigation if (route.path === hitPathname) { - window.location.assign(window.location.origin + suggestionUrl) + window.location.assign(window.location.origin + itemUrl) } else { - router.go(suggestionUrl) + router.go(itemUrl) } }, },