File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -105,9 +105,20 @@ export default function combineReducers(reducers) {
105
105
return newState ;
106
106
} ) ;
107
107
108
- if ( process . env . NODE_ENV !== 'production' && ! stateShapeVerified ) {
109
- verifyStateShape ( state , finalState ) ;
110
- stateShapeVerified = true ;
108
+ if ( (
109
+ // Node-like CommonJS environments (Browserify, Webpack)
110
+ typeof process !== 'undefined' &&
111
+ typeof process . env !== 'undefined' &&
112
+ process . env . NODE_ENV !== 'production'
113
+ ) ||
114
+ // React Native
115
+ typeof __DEV__ !== 'undefined' &&
116
+ __DEV__ //eslint-disable-line no-undef
117
+ ) {
118
+ if ( ! stateShapeVerified ) {
119
+ verifyStateShape ( state , finalState ) ;
120
+ stateShapeVerified = true ;
121
+ }
111
122
}
112
123
113
124
return finalState ;
You can’t perform that action at this time.
0 commit comments