instantsearch.js 4.33.1 → 4.33.2

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.
@@ -234,6 +234,8 @@ function isRefined(state, attribute, option) {
234
234
  if (option.start !== undefined && option.end !== undefined) {
235
235
  if (option.start === option.end) {
236
236
  return hasNumericRefinement(currentRefinements, '=', option.start);
237
+ } else {
238
+ return hasNumericRefinement(currentRefinements, '>=', option.start) && hasNumericRefinement(currentRefinements, '<=', option.end);
237
239
  }
238
240
  }
239
241
 
@@ -287,17 +289,17 @@ function getRefinedState(state, attribute, facetValue) {
287
289
  if (refinedOption.start !== undefined) {
288
290
  if (hasNumericRefinement(currentRefinements, '>=', refinedOption.start)) {
289
291
  resolvedState = resolvedState.removeNumericRefinement(attribute, '>=', refinedOption.start);
290
- } else {
291
- resolvedState = resolvedState.addNumericRefinement(attribute, '>=', refinedOption.start);
292
292
  }
293
+
294
+ resolvedState = resolvedState.addNumericRefinement(attribute, '>=', refinedOption.start);
293
295
  }
294
296
 
295
297
  if (refinedOption.end !== undefined) {
296
298
  if (hasNumericRefinement(currentRefinements, '<=', refinedOption.end)) {
297
299
  resolvedState = resolvedState.removeNumericRefinement(attribute, '<=', refinedOption.end);
298
- } else {
299
- resolvedState = resolvedState.addNumericRefinement(attribute, '<=', refinedOption.end);
300
300
  }
301
+
302
+ resolvedState = resolvedState.addNumericRefinement(attribute, '<=', refinedOption.end);
301
303
  }
302
304
 
303
305
  if (typeof resolvedState.page === 'number') {
@@ -1,2 +1,2 @@
1
- declare const _default: "4.33.1";
1
+ declare const _default: "4.33.2";
2
2
  export default _default;
package/es/lib/version.js CHANGED
@@ -1 +1 @@
1
- export default '4.33.1';
1
+ export default '4.33.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instantsearch.js",
3
- "version": "4.33.1",
3
+ "version": "4.33.2",
4
4
  "description": "InstantSearch.js is a JavaScript library for building performant and instant search experiences with Algolia.",
5
5
  "homepage": "https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/",
6
6
  "types": "es/index.d.ts",
@@ -61,10 +61,10 @@
61
61
  "hogan.js": "^3.0.2",
62
62
  "preact": "^10.0.0",
63
63
  "qs": "^6.5.1 < 6.10",
64
- "search-insights": "^2.0.5"
64
+ "search-insights": "^2.1.0"
65
65
  },
66
66
  "devDependencies": {
67
- "@algolia/client-search": "4.10.3",
67
+ "@algolia/client-search": "4.11.0",
68
68
  "@babel/cli": "7.8.4",
69
69
  "@babel/core": "7.9.6",
70
70
  "@babel/plugin-proposal-class-properties": "7.8.3",
@@ -95,7 +95,7 @@
95
95
  "@wdio/selenium-standalone-service": "5.16.5",
96
96
  "@wdio/spec-reporter": "5.16.5",
97
97
  "@wdio/static-server-service": "5.16.5",
98
- "algoliasearch": "4.10.3",
98
+ "algoliasearch": "4.11.0",
99
99
  "algoliasearch-v3": "npm:algoliasearch@3.35.1",
100
100
  "babel-eslint": "10.0.3",
101
101
  "babel-jest": "27.1.0",