Skip to content

Commit

Permalink
Fixed polling error
Browse files Browse the repository at this point in the history
Fixed polling error
  • Loading branch information
ArjhanToteck committed Mar 12, 2024
1 parent c54bf67 commit fa835be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/DirectoryWatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,14 @@ class DirectoryWatcher extends EventEmitter {
}
}
};
this.watcher.on("change", this.onWatchEvent.bind(this));

Check warning on line 109 in lib/DirectoryWatcher.js

View check run for this annotation

Codecov / codecov/patch

lib/DirectoryWatcher.js#L109

Added line #L109 was not covered by tests
} else {
if (IS_OSX) {
this.watchInParentDirectory();
}
this.watcher = watchEventSource.watch(this.path);
this.watcher.on("change", this.onWatchEvent.bind(this));
this.watcher.on("error", this.onWatcherError.bind(this));
this.watcher.on("change", this.onWatchEvent.bind(this));
}
} catch (err) {
this.onWatcherError(err);
Expand Down

0 comments on commit fa835be

Please sign in to comment.