Skip to content

Commit

Permalink
fix: emit rebuild-cache _onDirectoryChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Mar 18, 2021
1 parent d09ec83 commit 8829c78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/paths-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,15 @@ export default class PathsCache extends EventEmitter {
* @private
*/
_onDirectoryChanged(projectDirectory, directory) {
this.emit("rebuild-cache")
this._removeFilePathsForDirectory(projectDirectory, directory)
this._cleanWatchersForDirectory(directory)
this._cachePathsForDirectoryWithGlob(directory.path).catch((e) => {
// fallback to Atom
console.error(e)
this._cachePathsForDirectoryWithAtom(projectDirectory, directory)
})
this.emit("rebuild-cache-done")
}

/**
Expand Down

0 comments on commit 8829c78

Please sign in to comment.