Skip to content

Commit

Permalink
watch: fix null fileName on windows systems
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vnc5 authored and richardlau committed Mar 25, 2024
1 parent b5bc597 commit 63bf8a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/watch_mode/files_watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class FilesWatcher extends EventEmitter {
}
const watcher = watch(path, { recursive, signal: this.#signal });
watcher.on('change', (eventType, fileName) => this
.#onChange(recursive ? resolve(path, fileName) : path));
.#onChange(recursive ? resolve(path, fileName ?? '') : path));
this.#watchers.set(path, { handle: watcher, recursive });
if (recursive) {
this.#removeWatchedChildren(path);
Expand Down

0 comments on commit 63bf8a6

Please sign in to comment.