1 parent 75b5fd3 commit f995b0dCopy full SHA for f995b0d
1 file changed
index.js
@@ -13,11 +13,11 @@ if (!module.hot || process.env.NODE_ENV === 'production') {
13
// RHL needs setPrototypeOf to operate Component inheritance, and eval to patch methods
14
var jsFeaturesPresent = typeof window !== 'undefined' && !!Object.setPrototypeOf;
15
16
- if (!jsFeaturesPresent && evalAllowed) {
+ if (!jsFeaturesPresent || !evalAllowed) {
17
// we are not in prod mode, but RHL could not be activated
18
- console.warn('React-Hot-Loader is not supported in this environment');
+ console.warn('React-Hot-Loader is not supported in this environment.');
19
module.exports = require('./dist/react-hot-loader.production.min.js');
20
} else {
21
module.exports = window.reactHotLoaderGlobal = require('./dist/react-hot-loader.development.js');
22
}
23
-}
+}
0 commit comments