mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-08 23:19:43 +03:00
using spread operator with state return.
This commit is contained in:
parent
97a7b2c3a5
commit
61245bb54c
@ -21,10 +21,14 @@ const initialState:State = {
|
||||
switch (type) {
|
||||
case SET_BENEFICIARIES:
|
||||
state.beneficiariesMap[payload.draftId] = payload.benficiaries;
|
||||
return state;
|
||||
return {
|
||||
...state //spread operator in requried here, otherwise persist do not register change
|
||||
};
|
||||
case REMOVE_BENEFICIARIES:
|
||||
delete state.beneficiariesMap[payload.draftId]
|
||||
return state;
|
||||
return {
|
||||
...state //spread operator in requried here, otherwise persist do not register change
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user