From 6ba75a7c52a0568d6508fb105a840f3dca1ac602 Mon Sep 17 00:00:00 2001 From: DJCordhose Date: Thu, 1 Feb 2018 14:37:38 +0100 Subject: [PATCH] fix(redux): missing options no longer crash --- packages/redux/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/redux/index.js b/packages/redux/index.js index 663779c9b..abefa3d38 100644 --- a/packages/redux/index.js +++ b/packages/redux/index.js @@ -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');