File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,19 @@ function showErrorOverlay(message) {
123
123
} ) ;
124
124
}
125
125
126
+ function destroyErrorOverlay ( ) {
127
+ if ( ! overlayDiv ) {
128
+ // It is not there in the first place.
129
+ return ;
130
+ }
131
+
132
+ // Clean up and reset internal state.
133
+ document . body . removeChild ( overlayIframe ) ;
134
+ overlayDiv = null ;
135
+ overlayIframe = null ;
136
+ lastOnOverlayDivReady = null ;
137
+ }
138
+
126
139
// Connect to WebpackDevServer via a socket.
127
140
var connection = new SockJS ( url . format ( {
128
141
protocol : window . location . protocol ,
@@ -156,6 +169,7 @@ function clearOutdatedErrors() {
156
169
// Successful compilation.
157
170
function handleSuccess ( ) {
158
171
clearOutdatedErrors ( ) ;
172
+ destroyErrorOverlay ( ) ;
159
173
160
174
var isHotUpdate = ! isFirstCompilation ;
161
175
isFirstCompilation = false ;
@@ -170,6 +184,7 @@ function handleSuccess() {
170
184
// Compilation with warnings (e.g. ESLint).
171
185
function handleWarnings ( warnings ) {
172
186
clearOutdatedErrors ( ) ;
187
+ destroyErrorOverlay ( ) ;
173
188
174
189
var isHotUpdate = ! isFirstCompilation ;
175
190
isFirstCompilation = false ;
You can’t perform that action at this time.
0 commit comments