1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-26 01:17:00 +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 =>
api
.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));
}