Skip to content

Commit 56e8969

Browse files
vnc5RafaelGSS
authored andcommitted
watch: fix null fileName on windows systems
PR-URL: #49891 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 4a5d3bd commit 56e8969

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/watch_mode/files_watcher.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class FilesWatcher extends EventEmitter {
9898
}
9999
const watcher = watch(path, { recursive, signal: this.#signal });
100100
watcher.on('change', (eventType, fileName) => this
101-
.#onChange(recursive ? resolve(path, fileName) : path));
101+
.#onChange(recursive ? resolve(path, fileName ?? '') : path));
102102
this.#watchers.set(path, { handle: watcher, recursive });
103103
if (recursive) {
104104
this.#removeWatchedChildren(path);

0 commit comments

Comments
 (0)