Skip to content

Commit

Permalink
fix($theme-default): override algoliaOptions correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed Jan 26, 2021
1 parent 4893b41 commit ba89f39
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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, '/')
Expand Down

0 comments on commit ba89f39

Please sign in to comment.