File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,15 +36,15 @@ if(module.hot) {
3636
3737 } ) ;
3838 }
39- window . onmessage = function ( event ) {
39+ window . addEventListener ( "message" , function ( event ) {
4040 if ( typeof event . data === "string" && event . data . indexOf ( "webpackHotUpdate" ) === 0 ) {
4141 lastData = event . data ;
4242 if ( ! upToDate ( ) && module . hot . status ( ) === "idle" ) {
4343 console . log ( "[HMR] Checking for updates on the server..." ) ;
4444 check ( ) ;
4545 }
4646 }
47- } ;
47+ } ) ;
4848 console . log ( "[HMR] Waiting for update signal from WDS..." ) ;
4949} else {
5050 throw new Error ( "[HMR] Hot Module Replacement is disabled" ) ;
Original file line number Diff line number Diff line change @@ -60,15 +60,15 @@ if(module.hot) {
6060 } ) ;
6161 } ) ;
6262 }
63- window . onmessage = function ( event ) {
63+ window . addEventListener ( "message" , function ( event ) {
6464 if ( typeof event . data === "string" && event . data . indexOf ( "webpackHotUpdate" ) === 0 ) {
6565 lastData = event . data ;
6666 if ( ! upToDate ( ) && module . hot . status ( ) === "idle" ) {
6767 console . log ( "[HMR] Checking for updates on the server..." ) ;
6868 check ( ) ;
6969 }
7070 }
71- } ;
71+ } ) ;
7272 console . log ( "[HMR] Waiting for update signal from WDS..." ) ;
7373} else {
7474 throw new Error ( "[HMR] Hot Module Replacement is disabled" ) ;
You can’t perform that action at this time.
0 commit comments