Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit 39f50ec

Browse files
committed
Grouping CHANGE and LOAD actions in model reducer
1 parent 3a03021 commit 39f50ec

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/reducers/model-reducer.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ function createModeler(getter = _get, setter = icepickSet, initialModelState = {
3131
return action.actions.reduce(modelReducer, state);
3232

3333
case actionTypes.CHANGE:
34-
if (!localPath.length) {
35-
return action.value;
36-
}
37-
38-
if (isEqual(getter(state, localPath), action.value)) {
39-
return state;
40-
}
41-
42-
return setter(state, localPath, action.value);
43-
4434
case actionTypes.LOAD:
4535
if (!localPath.length) {
4636
return action.value;
@@ -52,7 +42,6 @@ function createModeler(getter = _get, setter = icepickSet, initialModelState = {
5242

5343
return setter(state, localPath, action.value);
5444

55-
5645
case actionTypes.RESET:
5746
if (!localPath.length) {
5847
return initialState;

0 commit comments

Comments
 (0)