Skip to content

Commit bb8002b

Browse files
committed
fix: #4236 again
1 parent 11c4e11 commit bb8002b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/projects/reducers/projectSearch.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,15 @@ export default function(state = initialState, action) {
159159
})
160160

161161
case UPDATE_PROJECT_SUCCESS: {
162-
// only update status
163162
const { projects } = state
164163
const projectIndex = _.findIndex(projects, {id: action.payload.id})
165-
const newProject = {...projects[projectIndex], status: action.payload.status}
166-
164+
const oldProject = projects[projectIndex]
165+
const newProject = {
166+
...action.payload,
167+
attachments: _.get(oldProject, 'attachments', []),
168+
members: _.get(oldProject, 'members', []),
169+
invites: _.get(oldProject, 'invites', []),
170+
}
167171
return update(state, {
168172
projects: { $splice: [[projectIndex, 1, newProject]] }
169173
})

0 commit comments

Comments
 (0)