@@ -107,7 +107,7 @@ function handleSuccess() {
107
107
tryApplyUpdates ( function onHotUpdateSuccess ( ) {
108
108
// Only dismiss it when we're sure it's a hot update.
109
109
// Otherwise it would flicker right before the reload.
110
- ErrorOverlay . dismissBuildError ( ) ;
110
+ dismissBuildErrorIFNotWaiting ( ) ;
111
111
} ) ;
112
112
}
113
113
}
@@ -148,7 +148,7 @@ function handleWarnings(warnings) {
148
148
tryApplyUpdates ( function onSuccessfulHotUpdate ( ) {
149
149
// Only dismiss it when we're sure it's a hot update.
150
150
// Otherwise it would flicker right before the reload.
151
- ErrorOverlay . dismissBuildError ( ) ;
151
+ dismissBuildErrorIFNotWaiting ( ) ;
152
152
} ) ;
153
153
}
154
154
}
@@ -186,6 +186,14 @@ function handleAvailableHash(hash) {
186
186
mostRecentCompilationHash = hash ;
187
187
}
188
188
189
+ function dismissBuildErrorIFNotWaiting ( ) {
190
+ if ( isWaitingForTypes ) {
191
+ return ;
192
+ }
193
+
194
+ ErrorOverlay . dismissBuildError ( ) ;
195
+ }
196
+
189
197
// Handle messages from the server.
190
198
connection . onmessage = function ( e ) {
191
199
var message = JSON . parse ( e . data ) ;
@@ -207,6 +215,9 @@ connection.onmessage = function(e) {
207
215
case 'wait-for-types' :
208
216
isWaitingForTypes = message . data ;
209
217
break ;
218
+ case 'dismiss-build-error' :
219
+ ErrorOverlay . dismissBuildError ( ) ;
220
+ break ;
210
221
case 'errors' :
211
222
handleErrors ( message . data ) ;
212
223
break ;
@@ -225,7 +236,7 @@ function isUpdateAvailable() {
225
236
226
237
// Webpack disallows updates in other states.
227
238
function canApplyUpdates ( ) {
228
- return module . hot . status ( ) === 'idle' && ! isWaitingForTypes ;
239
+ return module . hot . status ( ) === 'idle' ;
229
240
}
230
241
231
242
// Attempt to update code on the fly, fall back to a hard reload.
0 commit comments