instantsearch.js 4.56.9 → 4.56.10
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/cjs/lib/server.js +11 -6
- package/cjs/lib/version.js +1 -1
- package/dist/instantsearch.development.js +2 -2
- 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/lib/server.js +11 -6
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/package.json +5 -5
package/cjs/lib/server.js
CHANGED
|
@@ -49,12 +49,17 @@ function getInitialResults(rootIndex) {
|
|
|
49
49
|
var initialResults = {};
|
|
50
50
|
(0, _utils.walkIndex)(rootIndex, function (widget) {
|
|
51
51
|
var searchResults = widget.getResults();
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
if (searchResults) {
|
|
53
|
+
initialResults[widget.getIndexId()] = {
|
|
54
|
+
// We convert the Helper state to a plain object to pass parsable data
|
|
55
|
+
// structures from server to client.
|
|
56
|
+
state: _objectSpread({}, searchResults._state),
|
|
57
|
+
results: searchResults._rawResults
|
|
58
|
+
};
|
|
59
|
+
}
|
|
58
60
|
});
|
|
61
|
+
if (Object.keys(initialResults).length === 0) {
|
|
62
|
+
throw new Error('The root index does not have any results. Make sure you have at least one widget that provides results.');
|
|
63
|
+
}
|
|
59
64
|
return initialResults;
|
|
60
65
|
}
|
package/cjs/lib/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! InstantSearch.js 4.56.
|
|
1
|
+
/*! InstantSearch.js 4.56.10 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch.js */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -14617,7 +14617,7 @@
|
|
|
14617
14617
|
};
|
|
14618
14618
|
}
|
|
14619
14619
|
|
|
14620
|
-
var version$1 = '4.56.
|
|
14620
|
+
var version$1 = '4.56.10';
|
|
14621
14621
|
|
|
14622
14622
|
var withUsage$r = createDocumentationMessageGenerator({
|
|
14623
14623
|
name: 'instantsearch'
|