@abi-software/map-side-bar 1.3.11 → 1.3.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/map-side-bar",
3
- "version": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "main": "./dist/map-side-bar.common.js",
5
5
  "files": [
6
6
  "dist/*",
@@ -56,9 +56,13 @@ export function getFilters(selectedFacetArray=undefined) {
56
56
  return;
57
57
  }
58
58
  orFilters = `(${orFilters.substring(0, orFilters.lastIndexOf(" OR "))})` // remove last OR
59
- filters += `${orFilters + andFilters} AND `; // Put them together
59
+
60
+ filters += `${orFilters + andFilters} AND `; // Put them together
60
61
  // (Note that we add an extra AND in case there are facets at a higher level)
62
+
63
+ filters = filters.split('()AND ').join(''); // Handle case where there where no OR facets
61
64
  });
65
+ console.log('filter string: ', filters.substring(0, filters.lastIndexOf(" AND ")))
62
66
  return filters.substring(0, filters.lastIndexOf(" AND "));
63
67
  }
64
68