File tree 1 file changed +3
-9
lines changed 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -189,16 +189,10 @@ module.exports = class MultiCompiler extends Tapable {
189
189
watch ( watchOptions , handler ) {
190
190
if ( this . running ) return handler ( new ConcurrentCompilationError ( ) ) ;
191
191
192
- const finalHandler = ( err , stats ) => {
193
- this . running = false ;
194
-
195
- if ( handler !== undefined ) handler ( err , stats ) ;
196
- } ;
197
-
198
192
let watchings = [ ] ;
199
193
let allStats = this . compilers . map ( ( ) => null ) ;
200
194
let compilerStatus = this . compilers . map ( ( ) => false ) ;
201
- if ( this . validateDependencies ( finalHandler ) ) {
195
+ if ( this . validateDependencies ( handler ) ) {
202
196
this . running = true ;
203
197
this . runWithDependencies (
204
198
this . compilers ,
@@ -210,7 +204,7 @@ module.exports = class MultiCompiler extends Tapable {
210
204
? watchOptions [ compilerIdx ]
211
205
: watchOptions ,
212
206
( err , stats ) => {
213
- if ( err ) finalHandler ( err ) ;
207
+ if ( err ) handler ( err ) ;
214
208
if ( stats ) {
215
209
allStats [ compilerIdx ] = stats ;
216
210
compilerStatus [ compilerIdx ] = "new" ;
@@ -220,7 +214,7 @@ module.exports = class MultiCompiler extends Tapable {
220
214
} ) ;
221
215
compilerStatus . fill ( true ) ;
222
216
const multiStats = new MultiStats ( freshStats ) ;
223
- finalHandler ( null , multiStats ) ;
217
+ handler ( null , multiStats ) ;
224
218
}
225
219
}
226
220
if ( firstRun && ! err ) {
You can’t perform that action at this time.
0 commit comments