Skip to content

Commit

Permalink
watch: fix null fileName on windows systems
Browse files Browse the repository at this point in the history
  • Loading branch information
vnc5 committed Sep 27, 2023
1 parent a6ad048 commit 20bc2a1
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 20bc2a1

Please sign in to comment.