Skip to content

Commit 34c739b

Browse files
authored
Minor style tweaks
1 parent 15672ac commit 34c739b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/react-dev-utils/webpackHotDevClient.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,13 @@ function showErrorOverlay(message) {
123123
});
124124
}
125125

126-
function destroyOverlay() {
127-
if(!overlayDiv) {
128-
//linting from previous linting was successful
126+
function destroyErrorOverlay() {
127+
if (!overlayDiv) {
128+
// It is not there in the first place.
129129
return;
130130
}
131131

132+
// Clean up and reset internal state.
132133
document.body.removeChild(overlayIframe);
133134
overlayDiv = null;
134135
overlayIframe = null;
@@ -168,7 +169,7 @@ function clearOutdatedErrors() {
168169
// Successful compilation.
169170
function handleSuccess() {
170171
clearOutdatedErrors();
171-
destroyOverlay();
172+
destroyErrorOverlay();
172173

173174
var isHotUpdate = !isFirstCompilation;
174175
isFirstCompilation = false;
@@ -183,7 +184,7 @@ function handleSuccess() {
183184
// Compilation with warnings (e.g. ESLint).
184185
function handleWarnings(warnings) {
185186
clearOutdatedErrors();
186-
destroyOverlay();
187+
destroyErrorOverlay();
187188

188189
var isHotUpdate = !isFirstCompilation;
189190
isFirstCompilation = false;

0 commit comments

Comments
 (0)