react-instantsearch-core 7.0.1 → 7.0.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.
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = '7.0.1';
7
+ var _default = '7.0.2';
8
8
  exports.default = _default;
@@ -1,2 +1,2 @@
1
- declare const _default: "7.0.1";
1
+ declare const _default: "7.0.2";
2
2
  export default _default;
@@ -1 +1 @@
1
- export default '7.0.1';
1
+ export default '7.0.2';
@@ -7,7 +7,7 @@
7
7
 
8
8
  var React__default = 'default' in React ? React['default'] : React;
9
9
 
10
- var version = '7.0.1';
10
+ var version = '7.0.2';
11
11
 
12
12
  // Copyright Joyent, Inc. and other Node contributors.
13
13
  //
@@ -11262,7 +11262,7 @@
11262
11262
  };
11263
11263
  }
11264
11264
 
11265
- var version$2 = '4.56.9';
11265
+ var version$2 = '4.56.10';
11266
11266
 
11267
11267
  function _typeof$j(obj) {
11268
11268
  "@babel/helpers - typeof";
@@ -17399,13 +17399,18 @@
17399
17399
  var initialResults = {};
17400
17400
  walkIndex(rootIndex, function (widget) {
17401
17401
  var searchResults = widget.getResults();
17402
- initialResults[widget.getIndexId()] = {
17403
- // We convert the Helper state to a plain object to pass parsable data
17404
- // structures from server to client.
17405
- state: _objectSpread$v({}, searchResults._state),
17406
- results: searchResults._rawResults
17407
- };
17402
+ if (searchResults) {
17403
+ initialResults[widget.getIndexId()] = {
17404
+ // We convert the Helper state to a plain object to pass parsable data
17405
+ // structures from server to client.
17406
+ state: _objectSpread$v({}, searchResults._state),
17407
+ results: searchResults._rawResults
17408
+ };
17409
+ }
17408
17410
  });
17411
+ if (Object.keys(initialResults).length === 0) {
17412
+ throw new Error('The root index does not have any results. Make sure you have at least one widget that provides results.');
17413
+ }
17409
17414
  return initialResults;
17410
17415
  }
17411
17416