We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5274c73 commit b7133c5Copy full SHA for b7133c5
src/helpers.js
@@ -261,15 +261,12 @@ export const index = function(items = [], fields = []) {
261
* calculates ids for filters
262
*/
263
export const filters_ids = function(facets_data) {
264
- let output = new FastBitSet([]);
265
-
266
- mapValues(facets_data, function(values, key) {
267
- mapValues(facets_data[key], function(facet_indexes, key2) {
268
- output = output.new_union(facets_data[key][key2]);
+ return Object.values(facets_data).reduce((output, values) => {
+ Object.values(values).forEach(facet_indexes => {
+ output = output.new_union(facet_indexes);
269
});
270
- });
271
272
- return output;
+ return output;
+ }, new FastBitSet([]));
273
};
274
275
/**
0 commit comments