diff options
Diffstat (limited to 'app/assets/javascripts/search/store/actions.js')
-rw-r--r-- | app/assets/javascripts/search/store/actions.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/search/store/actions.js b/app/assets/javascripts/search/store/actions.js index 3af2b7892be..cd89234a231 100644 --- a/app/assets/javascripts/search/store/actions.js +++ b/app/assets/javascripts/search/store/actions.js @@ -13,6 +13,7 @@ import { mergeById, isSidebarDirty, getAggregationsUrl, + prepareSearchAggregations, } from './utils'; export const fetchGroups = ({ commit }, search) => { @@ -135,12 +136,12 @@ export const fetchSidebarCount = ({ commit, state }) => { return Promise.all(promises); }; -export const fetchLanguageAggregation = ({ commit }) => { +export const fetchLanguageAggregation = ({ commit, state }) => { commit(types.REQUEST_AGGREGATIONS); return axios .get(getAggregationsUrl()) .then(({ data }) => { - commit(types.RECEIVE_AGGREGATIONS_SUCCESS, data); + commit(types.RECEIVE_AGGREGATIONS_SUCCESS, prepareSearchAggregations(state, data)); }) .catch((e) => { logError(e); |