Skip to content
Snippets Groups Projects
Commit 5e857442 authored by esikkala's avatar esikkala
Browse files

Fix constraint skipping

parent 745881db
No related branches found
No related tags found
No related merge requests found
......@@ -35,16 +35,18 @@ export const generateConstraintsBlock = ({
facetID,
inverse,
}) => {
delete constraints[facetID]; // use only constraints from other facets
//delete constraints[facetID];
let filterStr = '';
let constraintsArr = [];
for (const [key, value] of Object.entries(constraints)) {
constraintsArr.push({
id: key,
filterType: value.filterType,
priority: value.priority,
values: value.values,
});
if (key !== facetID) { // use only constraints from other facets
constraintsArr.push({
id: key,
filterType: value.filterType,
priority: value.priority,
values: value.values,
});
}
}
constraintsArr.sort((a, b) => a.priority - b.priority);
constraintsArr.map(c => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment