mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 22:09:12 +02:00
fix: added fallback for state removal (#2268)
This commit is contained in:
@@ -282,11 +282,12 @@ export class WorkspaceProjectStatesStore implements IWorkspaceProjectStatesStore
|
||||
*/
|
||||
removeProjectState = async (workspaceSlug: string, projectStateId: string): Promise<void | undefined> => {
|
||||
// if (!this.isSettingsEnabled) return undefined;
|
||||
|
||||
const currentProjectState = this.projectStates[projectStateId];
|
||||
try {
|
||||
unset(this.projectStates, projectStateId);
|
||||
await projectStateService.removeProjectState(workspaceSlug, projectStateId);
|
||||
} catch (error) {
|
||||
set(this.projectStates, projectStateId, currentProjectState);
|
||||
console.error("project states --> removeProjectState", error);
|
||||
throw error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user