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 <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
vnc5 authored and RafaelGSS committed Jan 2, 2024
1 parent 4a5d3bd commit 56e8969
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 56e8969

Please sign in to comment.