forked from github/plane
fix: mutation of states (#256)
* feat: label grouping, fix: new states response * fix: mutation of states
This commit is contained in:
committed by
GitHub
parent
bd399d6d1a
commit
8e3541b947
@@ -9,10 +9,7 @@ export const orderStateGroups = (unorderedStateGroups: StateResponse) =>
|
||||
|
||||
export const getStatesList = (stateGroups: any): IState[] => {
|
||||
// order the unordered state groups first
|
||||
const orderedStateGroups = Object.assign(
|
||||
{ backlog: [], unstarted: [], started: [], completed: [], cancelled: [] },
|
||||
stateGroups
|
||||
);
|
||||
const orderedStateGroups = orderStateGroups(stateGroups);
|
||||
|
||||
// extract states from the groups and return them
|
||||
return Object.keys(orderedStateGroups)
|
||||
|
||||
Reference in New Issue
Block a user