fix: hooks error

This commit is contained in:
DiamondThree 2023-01-08 19:15:25 +08:00
parent 17c79eebe4
commit e0d31659d9

View File

@ -84,13 +84,8 @@ export const TemporaryHelperProvider = ({
const newWorkspacesMeta = workspacesMeta.map(
(workspace: Workspace) => {
if (workspace.id === workspaceId) {
workspaceData.name && (workspace.name = workspaceData.name);
workspaceData.avatar &&
(workspace.avatar = workspaceData.avatar);
workspaceData.type && (workspace.type = workspaceData.type);
workspaceData.isPublish &&
(workspace.isPublish = workspaceData.isPublish);
return workspace;
const workspaceObj = Object.assign(workspace, workspaceData);
return workspaceObj;
}
return workspace;
}