File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class Watching {
1919 this . startTime = null ;
2020 this . invalid = false ;
2121 this . handler = handler ;
22- this . callbacks = [ ] ;
22+ this . callbacks = [ ] ;
2323 this . closed = false ;
2424 if ( typeof watchOptions === "number" ) {
2525 this . watchOptions = {
@@ -106,10 +106,8 @@ class Watching {
106106 if ( ! this . closed ) {
107107 this . watch ( compilation . fileDependencies , compilation . contextDependencies , compilation . missingDependencies ) ;
108108 }
109- this . callbacks . forEach ( function ( cb ) {
110- cb ( ) ;
111- } ) ;
112- this . callbacks . length = 0 ;
109+ this . callbacks . forEach ( cb => cb ( ) ) ;
110+ this . callbacks . length = 0 ;
113111 }
114112
115113 watch ( files , dirs , missing ) {
@@ -128,9 +126,9 @@ class Watching {
128126 }
129127
130128 invalidate ( callback ) {
131- if ( callback ) {
132- this . callbacks . push ( callback ) ;
133- }
129+ if ( callback ) {
130+ this . callbacks . push ( callback ) ;
131+ }
134132 if ( this . watcher ) {
135133 this . pausedWatcher = this . watcher ;
136134 this . watcher . pause ( ) ;
You can’t perform that action at this time.
0 commit comments