diff --git a/src/action-reducer.js b/src/action-reducer.js index 5006abe..1e67bd6 100644 --- a/src/action-reducer.js +++ b/src/action-reducer.js @@ -133,7 +133,7 @@ export default function reducer(state, action, mapImplementation = Object) { // top-level component? const { path, func } = r; const newState = func(mut.getIn(path), action); - if (newState === undefined) { + if (newState === undefined && mut.getIn(path) !== undefined) { throw new Error(`Your custom UI reducer at path ${path.join('.')} must return some state`); } mut.setIn(path, newState);