Skip to content

Commit ba89f39

Browse files
committedJan 26, 2021
fix($theme-default): override algoliaOptions correctly
1 parent 4893b41 commit ba89f39

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ export default {
5353
{
5454
inputSelector: '#algolia-search-input',
5555
// #697 Make docsearch work well at i18n mode.
56-
algoliaOptions: Object.assign({
57-
'facetFilters': [`lang:${lang}`].concat(algoliaOptions.facetFilters || [])
58-
}, algoliaOptions),
56+
algoliaOptions: {
57+
...algoliaOptions,
58+
facetFilters: [`lang:${lang}`].concat(algoliaOptions.facetFilters || [])
59+
},
5960
handleSelected: (input, event, suggestion) => {
6061
const { pathname, hash } = new URL(suggestion.url)
6162
const routepath = pathname.replace(this.$site.base, '/')

0 commit comments

Comments
 (0)
Please sign in to comment.