This commit is contained in:
8
node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js
generated
vendored
Normal file
8
node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export function getItemsCount(state) {
|
||||
if (state.collections.length === 0) {
|
||||
return 0;
|
||||
}
|
||||
return state.collections.reduce(function (sum, collection) {
|
||||
return sum + collection.items.length;
|
||||
}, 0);
|
||||
}
|
Reference in New Issue
Block a user