Skip to content

Commit

Permalink
Merge pull request #96 from pmmmwh/enhancement/metro-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pmmmwh committed May 28, 2020
2 parents 9a60c7c + 02e285f commit e8ad1a6
Show file tree
Hide file tree
Showing 7 changed files with 882 additions and 305 deletions.
8 changes: 7 additions & 1 deletion src/runtime/refreshUtils.js
@@ -1,4 +1,4 @@
/* global __react_refresh_error_overlay__ */
/* global __react_refresh_error_overlay__, __react_refresh_test__ */
const Refresh = require('react-refresh/runtime');

/**
Expand Down Expand Up @@ -78,6 +78,12 @@ function createHotErrorHandler(moduleId) {
if (__react_refresh_error_overlay__) {
__react_refresh_error_overlay__.handleRuntimeError(error);
}

if (typeof __react_refresh_test__ !== 'undefined') {
if (window.onHotAcceptError) {
window.onHotAcceptError(error.message);
}
}
}

/**
Expand Down

0 comments on commit e8ad1a6

Please sign in to comment.