fix: mutation of states (#256)

* feat: label grouping, fix: new states response

* fix: mutation of states
This commit is contained in:
Aaryan Khandelwal
2023-02-08 23:58:17 +05:30
committed by GitHub
parent bd399d6d1a
commit 8e3541b947
5 changed files with 9 additions and 29 deletions

View File

@@ -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)