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:
parent
c42a06ffb9
commit
af07396d9a
@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user