From 0a0fe2bae5096341e755baf21679c464398d65e5 Mon Sep 17 00:00:00 2001 From: Kristofer Koishigawa Date: Sun, 27 Sep 2020 19:55:11 +0900 Subject: [PATCH] fix: suppress algolia errors (#39703) --- client/src/components/search/WithInstantSearch.js | 2 +- client/src/components/search/searchBar/SearchHits.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client/src/components/search/WithInstantSearch.js b/client/src/components/search/WithInstantSearch.js index 00f4ed0ebe..e38db5ed92 100644 --- a/client/src/components/search/WithInstantSearch.js +++ b/client/src/components/search/WithInstantSearch.js @@ -24,7 +24,7 @@ const DEBOUNCE_TIME = 100; const searchClient = algoliaAppId && algoliaAPIKey ? algoliasearch(algoliaAppId, algoliaAPIKey) - : {}; + : { search: () => {} }; const propTypes = { children: PropTypes.any, diff --git a/client/src/components/search/searchBar/SearchHits.js b/client/src/components/search/searchBar/SearchHits.js index cd0b5b04b8..d649dc60b8 100644 --- a/client/src/components/search/searchBar/SearchHits.js +++ b/client/src/components/search/searchBar/SearchHits.js @@ -59,7 +59,11 @@ const CustomHits = connectHits( key={hit.objectID} > {noHits ? ( - + ) : (