File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,19 @@ function showErrorOverlay(message) {
123123 } ) ;
124124}
125125
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+
126139// Connect to WebpackDevServer via a socket.
127140var connection = new SockJS ( url . format ( {
128141 protocol : window . location . protocol ,
@@ -156,6 +169,7 @@ function clearOutdatedErrors() {
156169// Successful compilation.
157170function handleSuccess ( ) {
158171 clearOutdatedErrors ( ) ;
172+ destroyErrorOverlay ( ) ;
159173
160174 var isHotUpdate = ! isFirstCompilation ;
161175 isFirstCompilation = false ;
@@ -170,6 +184,7 @@ function handleSuccess() {
170184// Compilation with warnings (e.g. ESLint).
171185function handleWarnings ( warnings ) {
172186 clearOutdatedErrors ( ) ;
187+ destroyErrorOverlay ( ) ;
173188
174189 var isHotUpdate = ! isFirstCompilation ;
175190 isFirstCompilation = false ;
You can’t perform that action at this time.
0 commit comments