File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
packages/project/lib/build/helpers Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -65,26 +65,21 @@ class WatchHandler extends EventEmitter {
6565 }
6666
6767 async #fileChanged( project , filePath ) {
68- // Collect changes (grouped by project), then trigger callbacks (debounced)
68+ // Collect changes (grouped by project), then trigger callbacks
6969 const resourcePath = project . getVirtualPath ( filePath ) ;
7070 if ( ! this . #sourceChanges. has ( project ) ) {
7171 this . #sourceChanges. set ( project , new Set ( ) ) ;
7272 }
7373 this . #sourceChanges. get ( project ) . add ( resourcePath ) ;
7474
7575 // Trigger callbacks debounced
76- if ( ! this . #fileChangeHandlerTimeout) {
77- this . #fileChangeHandlerTimeout = setTimeout ( async ( ) => {
78- await this . #handleResourceChanges( ) ;
79- this . #fileChangeHandlerTimeout = null ;
80- } , 100 ) ;
81- } else {
76+ if ( this . #fileChangeHandlerTimeout) {
8277 clearTimeout ( this . #fileChangeHandlerTimeout) ;
83- this . #fileChangeHandlerTimeout = setTimeout ( async ( ) => {
84- await this . #handleResourceChanges( ) ;
85- this . #fileChangeHandlerTimeout = null ;
86- } , 100 ) ;
8778 }
79+ this . #fileChangeHandlerTimeout = setTimeout ( async ( ) => {
80+ await this . #handleResourceChanges( ) ;
81+ this . #fileChangeHandlerTimeout = null ;
82+ } , 100 ) ;
8883 }
8984
9085 async #handleResourceChanges( ) {
You can’t perform that action at this time.
0 commit comments