Skip to content

Commit 25777e4

Browse files
kidonngsarahdayan
authored andcommitted
fix: add missing hash in #1706 (#1780)
1 parent 120d885 commit 25777e4

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
@@ -37,7 +37,8 @@ export default {
3737
'facetFilters': [`lang:${lang}`].concat(algoliaOptions.facetFilters || [])
3838
}, algoliaOptions),
3939
handleSelected: (input, event, suggestion) => {
40-
this.$router.push(new URL(suggestion.url).pathname)
40+
const { pathname, hash } = new URL(suggestion.url)
41+
this.$router.push(`${pathname}${hash}`)
4142
}
4243
}
4344
))

0 commit comments

Comments
 (0)