instantsearch.js 4.37.0 → 4.37.1
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/CHANGELOG.md +11 -0
- package/cjs/connectors/breadcrumb/connectBreadcrumb.js +4 -2
- package/cjs/lib/InstantSearch.js +9 -4
- package/cjs/lib/version.js +1 -1
- package/dist/instantsearch.development.js +15 -8
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/connectors/breadcrumb/connectBreadcrumb.js +4 -2
- package/es/lib/InstantSearch.js +9 -4
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/package.json +1 -1
- package/package.json +2 -2
|
@@ -49,7 +49,9 @@ var connectBreadcrumb = function connectBreadcrumb(renderFn) {
|
|
|
49
49
|
if (!facetValue) {
|
|
50
50
|
var breadcrumb = state.getHierarchicalFacetBreadcrumb(hierarchicalFacetName);
|
|
51
51
|
|
|
52
|
-
if (breadcrumb.length
|
|
52
|
+
if (breadcrumb.length === 0) {
|
|
53
|
+
return state;
|
|
54
|
+
} else {
|
|
53
55
|
return state.resetPage().toggleFacetRefinement(hierarchicalFacetName, breadcrumb[0]);
|
|
54
56
|
}
|
|
55
57
|
}
|
|
@@ -84,7 +86,7 @@ var connectBreadcrumb = function connectBreadcrumb(renderFn) {
|
|
|
84
86
|
state = _ref2.state;
|
|
85
87
|
|
|
86
88
|
function getItems() {
|
|
87
|
-
if (!results) {
|
|
89
|
+
if (!results || state.hierarchicalFacets.length === 0) {
|
|
88
90
|
return [];
|
|
89
91
|
}
|
|
90
92
|
|
package/es/lib/InstantSearch.js
CHANGED
|
@@ -425,10 +425,15 @@ var InstantSearch = /*#__PURE__*/function (_EventEmitter) {
|
|
|
425
425
|
|
|
426
426
|
mainHelper.on('error', function (_ref4) {
|
|
427
427
|
var error = _ref4.error;
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
428
|
+
// If an error is emitted, it is re-thrown by events. In previous versions
|
|
429
|
+
// we emitted {error}, which is thrown as:
|
|
430
|
+
// "Uncaught, unspecified \"error\" event. ([object Object])"
|
|
431
|
+
// To avoid breaking changes, we make the error available in both
|
|
432
|
+
// `error` and `error.error`
|
|
433
|
+
// @MAJOR emit only error
|
|
434
|
+
error.error = error;
|
|
435
|
+
|
|
436
|
+
_this3.emit('error', error);
|
|
432
437
|
});
|
|
433
438
|
this.mainHelper = mainHelper;
|
|
434
439
|
this.middleware.forEach(function (_ref5) {
|
package/es/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.37.
|
|
1
|
+
declare const _default: "4.37.1";
|
|
2
2
|
export default _default;
|
package/es/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '4.37.
|
|
1
|
+
export default '4.37.1';
|
package/es/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module"}
|
|
1
|
+
{"type":"module","sideEffects":false}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "instantsearch.js",
|
|
3
|
-
"version": "4.37.
|
|
3
|
+
"version": "4.37.1",
|
|
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",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"build": "yarn run build:cjs && yarn run build:es && yarn run build:umd && yarn run build:types",
|
|
26
26
|
"build:umd": "rm -rf dist && BABEL_ENV=umd rollup --config scripts/rollup/config.js",
|
|
27
27
|
"build:cjs": "rm -rf cjs && BABEL_ENV=cjs babel src --extensions '.js,.ts,.tsx' --out-dir cjs/ --ignore 'src/index.es.ts','**/__tests__','**/__mocks__' --quiet",
|
|
28
|
-
"build:es": "rm -rf es && BABEL_ENV=es babel src --extensions '.js,.ts,.tsx' --out-dir es/ --ignore 'src/index.es.ts','**/__tests__','**/__mocks__' --quiet && BABEL_ENV=es babel src/index.es.ts --out-file es/index.js --quiet && echo '{\"type\":\"module\"}' > es/package.json",
|
|
28
|
+
"build:es": "rm -rf es && BABEL_ENV=es babel src --extensions '.js,.ts,.tsx' --out-dir es/ --ignore 'src/index.es.ts','**/__tests__','**/__mocks__' --quiet && BABEL_ENV=es babel src/index.es.ts --out-file es/index.js --quiet && echo '{\"type\":\"module\",\"sideEffects\":false}' > es/package.json",
|
|
29
29
|
"build:types": "./scripts/typescript/extract.js",
|
|
30
30
|
"doctoc": "doctoc --no-title --maxlevel 3 README.md CONTRIBUTING.md",
|
|
31
31
|
"storybook": "start-storybook --quiet --port 6006 --ci --static-dir .storybook/static",
|