1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-06-04 01:18:20 +02:00

fix: fix sort-order

This commit is contained in:
Ivar Conradi Østhus 2020-03-11 18:52:23 +01:00
parent c42a06ffb9
commit af07396d9a

View File

@ -19,7 +19,10 @@ export function fetchContext() {
return dispatch => return dispatch =>
api api
.fetchAll() .fetchAll()
.then(json => dispatch(receiveContext(json))) .then(json => {
json.sort((a, b) => a.sortOrder - b.sortOrder);
dispatch(receiveContext(json))
})
.catch(dispatchAndThrow(dispatch, ERROR_RECEIVE_CONTEXT)); .catch(dispatchAndThrow(dispatch, ERROR_RECEIVE_CONTEXT));
} }