From ebc5b856d7aaff6586a458bd6da1a510391e71a5 Mon Sep 17 00:00:00 2001 From: Justineo Date: Tue, 24 Aug 2021 14:50:43 +0800 Subject: [PATCH] fix: fix search hit --- components/OneSearch.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/OneSearch.vue b/components/OneSearch.vue index 32e5518..525f3bb 100644 --- a/components/OneSearch.vue +++ b/components/OneSearch.vue @@ -70,14 +70,14 @@ export default { facetFilters: [`lang:${locale}`] }, navigator: { - navigate ({ suggestionUrl }) { + navigate: ({ itemUrl }) => { const { pathname: hitPathname } = new URL( - window.location.origin + suggestionUrl + window.location.origin + itemUrl ) if (this.$router.history.current.path === hitPathname) { - window.location.assign(window.location.origin + suggestionUrl) + window.location.assign(window.location.origin + itemUrl) } else { - this.$router.push(suggestionUrl) + this.$router.push(itemUrl) } } },