mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
[WEB-3829]fix: update workspace store action (#6905)
This commit is contained in:
committed by
GitHub
parent
d347269afb
commit
0ae57b49d2
@@ -162,11 +162,15 @@ export class WorkspaceRootStore implements IWorkspaceRootStore {
|
||||
* @param data
|
||||
*/
|
||||
updateWorkspace = async (workspaceSlug: string, data: Partial<IWorkspace>) =>
|
||||
await this.workspaceService.updateWorkspace(workspaceSlug, data).then((response) => {
|
||||
runInAction(() => {
|
||||
set(this.workspaces, response.id, response);
|
||||
});
|
||||
return response;
|
||||
await this.workspaceService.updateWorkspace(workspaceSlug, data).then((res) => {
|
||||
if (res && res.id) {
|
||||
runInAction(() => {
|
||||
Object.keys(data).forEach((key) => {
|
||||
set(this.workspaces, [res.id, key], data[key as keyof IWorkspace]);
|
||||
});
|
||||
});
|
||||
}
|
||||
return res;
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user