Skip to content

Commit 6183840

Browse files
authoredJun 13, 2020
fix($theme-default): handle algolia search result with Chinese hash (close: #2431) (#2432)
1 parent 20e7329 commit 6183840

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ export default {
5959
handleSelected: (input, event, suggestion) => {
6060
const { pathname, hash } = new URL(suggestion.url)
6161
const routepath = pathname.replace(this.$site.base, '/')
62-
this.$router.push(`${routepath}${hash}`)
62+
const _hash = decodeURIComponent(hash)
63+
this.$router.push(`${routepath}${_hash}`)
6364
}
6465
}
6566
))

0 commit comments

Comments
 (0)
Please sign in to comment.