@empathyco/x-components
Version:
Empathy X Components
15 lines (13 loc) • 676 B
JavaScript
/**
* Default implementation for the {@link HistoryQueriesGetters.historyQueriesWithResults} getter.
*
* @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the history
* queries module.
* @param getters - Current {@link https://vuex.vuejs.org/guide/getters.html | getters} of the
* history queries module.
* @returns The history queries that have results at the moment they were requested.
* @public
*/
const historyQueriesWithResults = (state, { historyQueries }) => historyQueries.filter(({ totalResults }) => totalResults !== 0);
export { historyQueriesWithResults };
//# sourceMappingURL=history-queries-with-results.getter.js.map