Skip to content

Commit 0139a96

Browse files
qzbtimdorr
authored andcommitted
Enable support for Mozilla Addons (#2030)
1 parent dfa2f80 commit 0139a96

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"lodash": "^4.2.1",
6868
"lodash-es": "^4.2.1",
6969
"loose-envify": "^1.1.0",
70-
"symbol-observable": "^1.0.2"
70+
"symbol-observable": "^1.0.3"
7171
},
7272
"devDependencies": {
7373
"babel-cli": "^6.3.15",

src/combineReducers.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { ActionTypes } from './createStore'
22
import isPlainObject from 'lodash/isPlainObject'
33
import warning from './utils/warning'
44

5+
var NODE_ENV = typeof process !== 'undefined' ? process.env.NODE_ENV : 'development'
6+
57
function getUndefinedStateErrorMessage(key, action) {
68
var actionType = action && action.type
79
var actionName = actionType && `"${actionType.toString()}"` || 'an action'
@@ -103,7 +105,7 @@ export default function combineReducers(reducers) {
103105
for (var i = 0; i < reducerKeys.length; i++) {
104106
var key = reducerKeys[i]
105107

106-
if (process.env.NODE_ENV !== 'production') {
108+
if (NODE_ENV !== 'production') {
107109
if (typeof reducers[key] === 'undefined') {
108110
warning(`No reducer provided for key "${key}"`)
109111
}
@@ -115,7 +117,7 @@ export default function combineReducers(reducers) {
115117
}
116118
var finalReducerKeys = Object.keys(finalReducers)
117119

118-
if (process.env.NODE_ENV !== 'production') {
120+
if (NODE_ENV !== 'production') {
119121
var unexpectedKeyCache = {}
120122
}
121123

@@ -131,7 +133,7 @@ export default function combineReducers(reducers) {
131133
throw sanityError
132134
}
133135

134-
if (process.env.NODE_ENV !== 'production') {
136+
if (NODE_ENV !== 'production') {
135137
var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache)
136138
if (warningMessage) {
137139
warning(warningMessage)

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import warning from './utils/warning'
1212
function isCrushed() {}
1313

1414
if (
15+
typeof process !== 'undefined' &&
1516
process.env.NODE_ENV !== 'production' &&
1617
typeof isCrushed.name === 'string' &&
1718
isCrushed.name !== 'isCrushed'

0 commit comments

Comments
 (0)