Closed mathisonian closed 8 years ago
This makes immutable
a direct dependency, i.e. requires removing immutable
from peerDependencies
and devDependencies
and adding to dependencies
.
updated.
This mgiht be simpler:
@@ -10,7 +11,7 @@ export default (reducers: Object) => {
reducerKeys = Object.keys(reducers);
- return (inputState, action) => {
+ return (inputState = Immutable.Map(), action) => {
/* eslint-disable no-process-env */
if (process.env.NODE_ENV !== 'production') {
/* eslint-enable no-process-env */
I'll defer to @gajus on the style. happy to update the PR
As discussed in #22, this PR adds support for nested
combineReducers
calls by defaulting to an empty immutable map if theinputState
is undefined.This adds a test for this behavior as well.