File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 4
4
( function register ( ) {
5
5
// eslint-disable-line no-extra-semi
6
6
/* react-hot-loader/webpack */
7
- const reactHotLoader = require ( 'react-hot-loader' ) . default ;
7
+ var safe_require = function ( ) {
8
+ return typeof require === 'undefined' ? undefined : require ( 'react-hot-loader' ) ;
9
+ } ;
10
+
11
+ var reactHotLoader = ( typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal : safe_require ( ) ) . default ;
8
12
9
13
if ( ! reactHotLoader ) {
10
14
return ;
13
17
/* eslint-disable camelcase, no-undef */
14
18
const webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : exports ;
15
19
/* eslint-enable camelcase, no-undef */
20
+ if ( ! webpackExports ) {
21
+ return ;
22
+ }
16
23
17
24
if ( typeof webpackExports === 'function' ) {
18
25
reactHotLoader . register ( webpackExports , 'module.exports' , __FILENAME__ ) ;
You can’t perform that action at this time.
0 commit comments