File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -123,12 +123,13 @@ function showErrorOverlay(message) {
123
123
} ) ;
124
124
}
125
125
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.
129
129
return ;
130
130
}
131
131
132
+ // Clean up and reset internal state.
132
133
document . body . removeChild ( overlayIframe ) ;
133
134
overlayDiv = null ;
134
135
overlayIframe = null ;
@@ -168,7 +169,7 @@ function clearOutdatedErrors() {
168
169
// Successful compilation.
169
170
function handleSuccess ( ) {
170
171
clearOutdatedErrors ( ) ;
171
- destroyOverlay ( ) ;
172
+ destroyErrorOverlay ( ) ;
172
173
173
174
var isHotUpdate = ! isFirstCompilation ;
174
175
isFirstCompilation = false ;
@@ -183,7 +184,7 @@ function handleSuccess() {
183
184
// Compilation with warnings (e.g. ESLint).
184
185
function handleWarnings ( warnings ) {
185
186
clearOutdatedErrors ( ) ;
186
- destroyOverlay ( ) ;
187
+ destroyErrorOverlay ( ) ;
187
188
188
189
var isHotUpdate = ! isFirstCompilation ;
189
190
isFirstCompilation = false ;
You can’t perform that action at this time.
0 commit comments