diff --git a/src/combineReducers.js b/src/combineReducers.js index 5a8a20a9b7..47ca265407 100644 --- a/src/combineReducers.js +++ b/src/combineReducers.js @@ -113,7 +113,7 @@ export default function combineReducers(reducers) { throw sanityError } - if (process.env.NODE_ENV !== 'production') { + if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV !== 'production') { var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action) if (warningMessage) { warning(warningMessage) diff --git a/src/index.js b/src/index.js index 5d0d8cd624..7ce6e93ef4 100644 --- a/src/index.js +++ b/src/index.js @@ -12,6 +12,8 @@ import warning from './utils/warning' function isCrushed() {} if ( + typeof process !== 'undefined' && + process.env && process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed'