Skip to content

Commit

Permalink
Use production patch/AppContainer if no module.hot
Browse files Browse the repository at this point in the history
Prevents cases where NODE_ENV=test imports the development AppContainer
and patching code. We can leave the NODE_ENV=production check in for
manually opting out. Closes #396.
  • Loading branch information
calesce committed Oct 14, 2016
1 parent 8fab49e commit b4de995
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/AppContainer.js
Expand Up @@ -2,7 +2,7 @@

'use strict';

if (!module.hot && process.env.NODE_ENV === 'production') {
if (!module.hot || process.env.NODE_ENV === 'production') {
module.exports = require('./AppContainer.prod');
} else {
module.exports = require('./AppContainer.dev');
Expand Down
2 changes: 1 addition & 1 deletion src/patch.js
Expand Up @@ -2,7 +2,7 @@

'use strict';

if (!module.hot && process.env.NODE_ENV === 'production') {
if (!module.hot || process.env.NODE_ENV === 'production') {
module.exports = require('./patch.prod');
} else {
module.exports = require('./patch.dev');
Expand Down

0 comments on commit b4de995

Please sign in to comment.