Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/react-dev-utils/webpackHotDevClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,18 @@ function showErrorOverlay(message) {
});
}

function destoryOverlay() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor thing, but you probably meant "destroy" rather than "destory", right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. pardon my spelling error ;-)

if(!overlayDiv) {
//linting from previous linting was successful
return;
}

document.body.removeChild(overlayIframe);
overlayDiv = null;
overlayIframe = null;
lastOnOverlayDivReady = null;
}

// Connect to WebpackDevServer via a socket.
var connection = new SockJS(url.format({
protocol: window.location.protocol,
Expand Down Expand Up @@ -156,6 +168,7 @@ function clearOutdatedErrors() {
// Successful compilation.
function handleSuccess() {
clearOutdatedErrors();
destoryOverlay();

var isHotUpdate = !isFirstCompilation;
isFirstCompilation = false;
Expand All @@ -170,6 +183,7 @@ function handleSuccess() {
// Compilation with warnings (e.g. ESLint).
function handleWarnings(warnings) {
clearOutdatedErrors();
destoryOverlay();

var isHotUpdate = !isFirstCompilation;
isFirstCompilation = false;
Expand Down