Skip to content

Commit

Permalink
simplify return logic; remove typeof check (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangmillstheory authored and timche committed Jul 10, 2016
1 parent d47a785 commit 1dc2449
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/handleActions.js
Expand Up @@ -6,7 +6,5 @@ export default function handleActions(handlers, defaultState) {
const reducers = ownKeys(handlers).map(type => handleAction(type, handlers[type]));
const reducer = reduceReducers(...reducers);

return typeof defaultState !== 'undefined'
? (state = defaultState, action) => reducer(state, action)
: reducer;
return (state = defaultState, action) => reducer(state, action);
}

0 comments on commit 1dc2449

Please sign in to comment.