Skip to content

Commit 4396dae

Browse files
committed
[CR] No need to check for changes
1 parent 9e80919 commit 4396dae

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/utils/combineReducers.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,7 @@ export default function combineReducers(reducers) {
110110
throw new Error(getErrorMessage(key, action));
111111
}
112112

113-
if( oldState != newState ) {
114-
finalState = finalState.set( key, newState );
115-
}
113+
finalState = finalState.set( key, newState );
116114
});
117115

118116
if ((

test/utils/combineReducers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('Utils', () => {
3535
});
3636

3737
it('returns the initial state when nothing changes', () => {
38-
const s1 = reducer(initialState, { type: 'increment'});
38+
const s1 = reducer(initialState, { type: 'increment' });
3939
const s2 = reducer(s1);
4040
expect(s1).toBe(s2);
4141
})

0 commit comments

Comments
 (0)