File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,11 +228,19 @@ module.exports = function() {
228228 hotDeferred = null ;
229229 if ( ! deferred ) return ;
230230 if ( hotApplyOnUpdate ) {
231- hotApply ( hotApplyOnUpdate ) . then ( function ( result ) {
232- deferred . resolve ( result ) ;
233- } , function ( err ) {
234- deferred . reject ( err ) ;
235- } ) ;
231+ // Wrap deferred object in Promise to mark it as a well-handled Promise to
232+ // avoid triggering uncaught exception warning in Chrome.
233+ // See https://bugs.chromium.org/p/chromium/issues/detail?id=465666
234+ Promise . resolve ( ) . then ( function ( ) {
235+ return hotApply ( hotApplyOnUpdate ) ;
236+ } ) . then (
237+ function ( result ) {
238+ deferred . resolve ( result ) ;
239+ } ,
240+ function ( err ) {
241+ deferred . reject ( err ) ;
242+ }
243+ ) ;
236244 } else {
237245 var outdatedModules = [ ] ;
238246 for ( var id in hotUpdate ) {
You can’t perform that action at this time.
0 commit comments