File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -726,7 +726,9 @@ class DirectoryWatcher extends EventEmitter {
726726 } else {
727727 for ( const dir of this . directories . keys ( ) ) {
728728 // No additional info about this directory
729- directoryTimestamps . set ( dir , EXISTANCE_ONLY_TIME_ENTRY ) ;
729+ // but maybe another DirectoryWatcher has info
730+ if ( ! directoryTimestamps . has ( dir ) )
731+ directoryTimestamps . set ( dir , EXISTANCE_ONLY_TIME_ENTRY ) ;
730732 }
731733 fileTimestamps . set ( this . path , EXISTANCE_ONLY_TIME_ENTRY ) ;
732734 directoryTimestamps . set ( this . path , EXISTANCE_ONLY_TIME_ENTRY ) ;
Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ const cachedNormalizeOptions = options => {
6666
6767class WatchpackFileWatcher {
6868 constructor ( watchpack , watcher , files ) {
69- if ( ! watcher ) throw new Error ( ) ;
7069 this . files = Array . isArray ( files ) ? files : [ files ] ;
7170 this . watcher = watcher ;
7271 watcher . on ( "initial-missing" , type => {
@@ -106,7 +105,6 @@ class WatchpackFileWatcher {
106105
107106class WatchpackDirectoryWatcher {
108107 constructor ( watchpack , watcher , directories ) {
109- if ( ! watcher ) throw new Error ( ) ;
110108 this . directories = Array . isArray ( directories ) ? directories : [ directories ] ;
111109 this . watcher = watcher ;
112110 watcher . on ( "initial-missing" , type => {
You can’t perform that action at this time.
0 commit comments