Skip to content

Commit a5c98fe

Browse files
committed
remove optional chaining for csb
1 parent 1e5f429 commit a5c98fe

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

instantsearch.js/render-state/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
.env.development.local
1717
.env.test.local
1818
.env.production.local
19+
.parcel-cache
1920

2021
npm-debug.log*
2122
yarn-debug.log*

instantsearch.js/render-state/src/app.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ const emptyHits = connectHits(({ hits, widgetParams }) => {
3232
return;
3333
}
3434

35-
const brandUiState = search.getUiState()[indexName].refinementList?.brand;
36-
const isPearRefined = brandUiState?.includes('Pear');
35+
const refinementListsUiState = search.getUiState()[indexName].refinementList;
36+
const isPearRefined =
37+
refinementListsUiState &&
38+
refinementListsUiState.brand &&
39+
refinementListsUiState.brand.includes('Pear');
3740

3841
if (!isPearRefined) {
3942
container.innerHTML = 'No results';

0 commit comments

Comments
 (0)