Skip to content

Commit

Permalink
ES2015 allows default values in function parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Oates committed Jan 25, 2018
1 parent 2c4b612 commit cf4fc65
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions redux.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ import {compose, createStore} from 'redux';

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;

const rootReducer = (state, action) => {
if (!state) {
state = {};
}

const rootReducer = (state = {}, action) => {
return Object.assign({}, state, action.payload);
};

Expand Down

0 comments on commit cf4fc65

Please sign in to comment.