mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Fix mutated initial state
This commit is contained in:
parent
b76cbadca3
commit
e121f0c3ae
2 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ const resultIds = data => data.data.map(l => l.id);
|
|||
const merge = (state, apiResponse) => {
|
||||
return {
|
||||
...state,
|
||||
ownEntities: updatedEntities(state.ownEntities, apiResponse.data),
|
||||
ownEntities: updatedEntities({ ...state.ownEntities }, apiResponse.data),
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const initialState = {
|
|||
const merge = (state, apiResponse) => {
|
||||
return {
|
||||
...state,
|
||||
entities: updatedEntities(state.entities, apiResponse.data),
|
||||
entities: updatedEntities({ ...state.entities }, apiResponse.data),
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue