diff --git a/packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue b/packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue index 7b2a5807cf..7071fb8fb0 100644 --- a/packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue +++ b/packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue @@ -53,9 +53,10 @@ export default { { inputSelector: '#algolia-search-input', // #697 Make docsearch work well at i18n mode. - algoliaOptions: Object.assign({ - 'facetFilters': [`lang:${lang}`].concat(algoliaOptions.facetFilters || []) - }, algoliaOptions), + algoliaOptions: { + ...algoliaOptions, + facetFilters: [`lang:${lang}`].concat(algoliaOptions.facetFilters || []) + }, handleSelected: (input, event, suggestion) => { const { pathname, hash } = new URL(suggestion.url) const routepath = pathname.replace(this.$site.base, '/')