mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-16 09:42:35 +02:00
fix(v2): Algolia: allow contextualSearch + facetFilters (#3804)
* remove contextualSearch facetFilters merging security * update doc
This commit is contained in:
parent
b6cd303354
commit
f1bed8dd69
5 changed files with 16 additions and 36 deletions
|
@ -41,17 +41,5 @@ exports.validateThemeConfig = function validateThemeConfig({
|
|||
validate,
|
||||
themeConfig,
|
||||
}) {
|
||||
const normalizedThemeConfig = validate(Schema, themeConfig);
|
||||
|
||||
if (
|
||||
normalizedThemeConfig &&
|
||||
normalizedThemeConfig.algolia.contextualSearch &&
|
||||
normalizedThemeConfig.algolia.searchParameters &&
|
||||
normalizedThemeConfig.algolia.searchParameters.facetFilters
|
||||
) {
|
||||
throw new Error(
|
||||
'If you are using algolia.contextualSearch: true, you should not provide algolia.searchParameters.facetFilters, as it is computed for you dynamically',
|
||||
);
|
||||
}
|
||||
return normalizedThemeConfig;
|
||||
return validate(Schema, themeConfig);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue