Skip to content

Commit

Permalink
fix(redux): missing options no longer crash
Browse files Browse the repository at this point in the history
  • Loading branch information
DJCordhose authored and dmbch committed Feb 2, 2018
1 parent 7813213 commit 6ba75a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/redux/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var REDUX_STATE = 'REDUX_STATE';

exports.ReduxContext = function(options) {
this.reducers = {};
options = options.redux || options || {};
options = (options && options.redux) || options || {};
this.middlewares = options.middlewares || [ReduxThunkMiddleware];
if (!Array.isArray(this.middlewares)) {
throw new Error('middlewares needs to be an array');
Expand Down

0 comments on commit 6ba75a7

Please sign in to comment.