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
Prev Previous commit
Minor style tweaks
  • Loading branch information
gaearon authored Oct 11, 2016
commit 34c739bdf7a17c599cbc4995ed5e659ee0de3e11
11 changes: 6 additions & 5 deletions packages/react-dev-utils/webpackHotDevClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,13 @@ function showErrorOverlay(message) {
});
}

function destroyOverlay() {
if(!overlayDiv) {
//linting from previous linting was successful
function destroyErrorOverlay() {
if (!overlayDiv) {
// It is not there in the first place.
return;
}

// Clean up and reset internal state.
document.body.removeChild(overlayIframe);
overlayDiv = null;
overlayIframe = null;
Expand Down Expand Up @@ -168,7 +169,7 @@ function clearOutdatedErrors() {
// Successful compilation.
function handleSuccess() {
clearOutdatedErrors();
destroyOverlay();
destroyErrorOverlay();

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

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