@algolia/autocomplete-js 1.18.0 → 1.18.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.
@@ -1,4 +1,4 @@
1
- /*! @algolia/autocomplete-js 1.18.0 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
1
+ /*! @algolia/autocomplete-js 1.18.1 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -347,7 +347,7 @@
347
347
  return undefined;
348
348
  }
349
349
 
350
- var version = '1.18.0';
350
+ var version = '1.18.1';
351
351
 
352
352
  var userAgents$1 = [{
353
353
  segment: 'autocomplete-core',
@@ -2835,7 +2835,9 @@
2835
2835
  return _objectSpread$6({
2836
2836
  'aria-autocomplete': 'both',
2837
2837
  'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? getAutocompleteElementId(props.id, "item-".concat(store.getState().activeItemId), activeItem === null || activeItem === void 0 ? void 0 : activeItem.source) : undefined,
2838
- 'aria-controls': store.getState().isOpen ? store.getState().collections.map(function (_ref4) {
2838
+ 'aria-controls': store.getState().isOpen ? store.getState().collections.filter(function (collection) {
2839
+ return collection.items.length > 0;
2840
+ }).map(function (_ref4) {
2839
2841
  var source = _ref4.source;
2840
2842
  return getAutocompleteElementId(props.id, 'list', source);
2841
2843
  }).join(' ') : undefined,