Skip to content

Commit b00b277

Browse files
SigureMometeorlxy
authored andcommitted
fix($theme-default): wrong algolia search route with base config (#2007)
1 parent 0bb85a4 commit b00b277

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
@@ -46,7 +46,8 @@ export default {
4646
}, algoliaOptions),
4747
handleSelected: (input, event, suggestion) => {
4848
const { pathname, hash } = new URL(suggestion.url)
49-
this.$router.push(`${pathname}${hash}`)
49+
const routepath = pathname.replace(this.$site.base, '/')
50+
this.$router.push(`${routepath}${hash}`)
5051
}
5152
}
5253
))

0 commit comments

Comments
 (0)