fix: exception error (#2606)
* fix: exception error * fix: invitation type
This commit is contained in:
parent
2cda47dc8a
commit
5b808571e5
4 changed files with 5 additions and 18 deletions
|
|
@ -102,7 +102,7 @@ export class ProjectLabelStore implements IProjectLabelStore {
|
|||
[projectId]: (this.rootStore.project.labels?.[projectId] || [])?.map((label) =>
|
||||
label.id === labelId ? { ...label, ...originalLabel } : label
|
||||
),
|
||||
} as any;
|
||||
};
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ export class ProjectStateStore implements IProjectStateStore {
|
|||
};
|
||||
|
||||
updateState = async (workspaceSlug: string, projectId: string, stateId: string, data: Partial<IState>) => {
|
||||
const originalStates = this.rootStore.project.states;
|
||||
const originalStates = this.rootStore.project.states || {};
|
||||
|
||||
runInAction(() => {
|
||||
this.rootStore.project.states = {
|
||||
|
|
@ -120,13 +120,7 @@ export class ProjectStateStore implements IProjectStateStore {
|
|||
} catch (error) {
|
||||
console.log("Failed to update state from project store");
|
||||
runInAction(() => {
|
||||
this.rootStore.project.states = {
|
||||
...this.rootStore.project.states,
|
||||
[projectId]: {
|
||||
...this.rootStore.project.states?.[projectId],
|
||||
[data.group as string]: originalStates || [],
|
||||
},
|
||||
} as any;
|
||||
this.rootStore.project.states = originalStates;
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue