typesense-instantsearch-adapter 2.9.0 → 2.9.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/typesense-instantsearch-adapter.js +9 -7
- package/dist/typesense-instantsearch-adapter.js.map +1 -1
- package/dist/typesense-instantsearch-adapter.min.js +1 -1
- package/dist/typesense-instantsearch-adapter.min.js.map +1 -1
- package/index.d.ts +18 -19
- package/lib/FacetSearchResponseAdapter.js +9 -7
- package/lib/FacetSearchResponseAdapter.js.map +1 -1
- package/package.json +2 -2
- package/src/FacetSearchResponseAdapter.js +11 -9
|
@@ -151,13 +151,15 @@ var FacetSearchResponseAdapter = /*#__PURE__*/function () {
|
|
|
151
151
|
var facet = typesenseFacetCounts.find(function (facet) {
|
|
152
152
|
return facet.field_name === _this.instantsearchRequest.params.facetName;
|
|
153
153
|
});
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
if (typeof facet !== 'undefined') {
|
|
155
|
+
adaptedResult = facet.counts.map(function (facetCount) {
|
|
156
|
+
return {
|
|
157
|
+
value: facetCount.value,
|
|
158
|
+
highlighted: _this._adaptHighlightTag(facetCount.highlighted, _this.instantsearchRequest.params.highlightPreTag, _this.instantsearchRequest.params.highlightPostTag),
|
|
159
|
+
count: facetCount.count
|
|
160
|
+
};
|
|
161
|
+
});
|
|
162
|
+
}
|
|
161
163
|
return adaptedResult;
|
|
162
164
|
}
|
|
163
165
|
}, {
|